Retrieve toplevel shape from a compound

Hi,
I read a IGES file by XDE, and I add all top-level shapes in a compound , then I use BRepBuilderAPI_Sewing to sew this compound. Now I want to retrieve all top-level shapes again from this sewed compound. Does anyone kowns how to do this? Is it possible to retrieve the shapes from a compound?

Thanks in advance
Best regards
Yilin

Marco Matt's picture

To find the components of the TopoDS_Compound comp

for (TopoDS_Iterator ext(comp); ext.More(); ext.Next())
{
TopoDS_Shape shape = ext.Value();
...
}

LIU's picture

Hi marco
Thanks for your help!!!
if I don't sew the compound ,this methode works perfectly. But when I tried to retrieve the components after sewing this compound, it doesn't work. I think that because the methode sewing has changed the components.
Anyone kown how to do in this case??

Thanks a lot
Yilin