How to get non-hollow stp files?

R G W

Active CAD practitioner
Hi everyone, I recently had some problems writing a shape of occ to stp file.
I have an occ solid shape, and then I use the following code to write it to the stp file.
C++:
STEPControl_Writer writer;
writer.Transfer(my_solid, STEPControl_ManifoldSolidBrep);
writer.Write("test_solid_target2.step");
My stp file is hollow when it is opened in solidworks, but isn't his type a solid entity type? Where is the problem? I hope you can give me some help, thank you very much.
 
Last edited:

R G W

Active CAD practitioner
My solid is generated from shell. Using BRepBuilderAPI_MakeSolid, it should be a solid instead of a hollow solid under normal circumstances.
Does this mean that there is something wrong with my shell? How can I detect and fix it?
 

R G W

Active CAD practitioner
Maybe I can solve the problem. When I set the tolerance of BRepOffsetAPI_Sewing a little larger, such as 1.0, the generated entity is not hollow.
Does this mean my shell is not closed? If so, I have no way to detect him
 

Quaoar

Administrator
Staff member
You may want to load your initial shape into Analysis Situs and check visually if it has any red edges. If so, such a shape cannot be a valid solid, and that is probably why SW would make it a shell instead. If you recover topology with sewing, make sure to conduct the same visual check afterwards to ensure that the result does not have any naked (open/free/you name it) edges. Other than that, the very fact that you had to increase the tolerance up to 1 mm is not a very good sign as it might indicate some inherent inaccuracy of your model. Feel free to share the initial STEP file for a more in-depth look.
 

R G W

Active CAD practitioner
You may want to load your initial shape into Analysis Situs and check visually if it has any red edges. If so, such a shape cannot be a valid solid, and that is probably why SW would make it a shell instead. If you recover topology with sewing, make sure to conduct the same visual check afterwards to ensure that the result does not have any naked (open/free/you name it) edges. Other than that, the very fact that you had to increase the tolerance up to 1 mm is not a very good sign as it might indicate some inherent inaccuracy of your model. Feel free to share the initial STEP file for a more in-depth look.
Your suggestion is very helpful, thanks a lot!
 
Top