Step Import- Mulitple Solids

I have always had an issue with step import, where it reads in a step file that is created with multiple solids as 1 solid. It seems to depend on the program that creates the step file. But from UG and Catia, I can only create step files that read in as one solid.
I have attached a sample, that if you look at the file, is clearly 3 separate solids.

Francois Lauzon's picture

in fact, when you import your Step file using OCC, you get a TopoDS_Compound which is compose of 3 TopoDS_Solid. You can extract all sub-shape of the compound like this:

for (TopoDS_Iterator iter(aCompoundShape); iter.More(); iter.Next()) {

// get the current sub-shape
// which in your case will be TopoDS_Solid
TopoDS_Shape currentShape=iter.Value();

Good Luck,

hamishl's picture

That's exactly what I needed thank you!