Hi shawn, you could explore a compound shape using an iterator TopoDS_Iterator to access the direct sub-shape of a shape:
// explore the current shape for (TopoDS_Iterator iter(aCompound);iter.More(); iter.Next()) {
// get the direct sub-shape TopoDS_Shape subShape=iter.Value();
// do something }
You might also have a look at TopExp_Explorer to explore a kind of sub-shape in a shape (for example all the face in the compound, either face from solid, direct face, face from shell,...) for (TopExp_Explorer Exp(aCompound,TopAbs_FACE); Exp.More(); Exp.Next()) { // get sub-face TopoDS_Face aFace=TopoDS::Face(Exp.Current()); }
Wed, 01/10/2001 - 18:50
Hi shawn, you could explore a compound shape using an iterator TopoDS_Iterator to access the direct sub-shape of a shape:
// explore the current shape for (TopoDS_Iterator iter(aCompound);iter.More(); iter.Next()) {
// get the direct sub-shape TopoDS_Shape subShape=iter.Value();
// do something }
You might also have a look at TopExp_Explorer to explore a kind of sub-shape in a shape (for example all the face in the compound, either face from solid, direct face, face from shell,...) for (TopExp_Explorer Exp(aCompound,TopAbs_FACE); Exp.More(); Exp.Next()) { // get sub-face TopoDS_Face aFace=TopoDS::Face(Exp.Current()); }
Good Luck, Francois.
Thu, 01/11/2001 - 05:43
Hi Fancois: Thanks for your help. I have solved it.
sincerely shawn