
Tue, 06/21/2011 - 18:54
Forums:
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.
Attachments:
Tue, 06/21/2011 - 19:06
Hello,
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,
Francois.
Wed, 06/22/2011 - 15:54
That's exactly what I needed thank you!