Part.OCCError: Bnd_Box is void
See original GitHub issueI am using a simple script to convert .step to .gltf
import sys
from cqparts import Part
args = sys.argv[1:]
filename = args[0].split(".")[0]
Part.importer('step')(args[0]).exporter('gltf')(filename + '.gltf')
And I get:
File “/home/home/.local/share/virtualenvs/blueprint-z4-87zsQ/lib/python2.7/site- packages/cadquery/freecad_impl/shapes.py”, line 966, in clean r = self.wrapped.removeSplitter()
It happens just with certain files (but they are not corrupt or anything). Any ideas what can be done to avoid this error? Also, it takes 5+ min befoer I get the error (4mb file).
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Bnd_box is void error - FreeCAD Forum
Hello, I am trying to export a file into a STP format and I am getting bnd_box is void error. Since I am...
Read more >"Bnd_Box is void" exception when running ShapeAnalysis
I was trying to get the uv-min and max parameters from a face using ShapeAnalysis::GetFaceUVBounds(), and in one case I encountered a ......
Read more >Error creating thread in nut · Issue #42 - GitHub
<class 'Part.OCCError'>: Shape is not a shell. Error creating thread in M5 nut (EN-1661):. Traceback (most recent call last):
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fragmuffin thanks for the help, I really appreciate it!
Hi @jan0991, sorry for the delay, I’ve been busy and got distracted.
I think I see the problem, the
step
file you’re importing has multiple parts, so it’s not aPart
, but anAssembly
. When callingPart.importer('step')
you get back an object that will create aPart
class, and return an instance of that class to import thestep
file you give it (there’s a few steps there)… but you want in importer to return anAssembly
instance instead.So the solution is as simple as exchanging
Part
forAssembly
:display
from a console should open a web-browser to display a gltf exportIn addition, because the
Assembly
has nested components, each one can be displayed individuallySadly this list of components is just a sequential index, each component’s name, hierarchy, and colour is lost during this import. An improvement is on the horizon #72, but it’s probably a distant horizon because its priority is a bit low.
The above code is working on the current
master
with no changes, so I’ll close this issue with the assumption it’ll work on yours too.Please let me know how you go, and feel free to re-open if I’m wrong 😉 Thank you for the feedback @jan0991 , it’s always good to see what people are doing with
cqparts
andcadquery
.