
Thu, 09/27/2007 - 17:43
Forums:
I am having difficulties retrieving a map of all the subshapes of my compound. It consists of a lot of faces, edges and vertices. If I do a
for( TopExp_Explorer it( shape, TopAbs_ShapeEnum::TopAbs_FACE ); it.More(); it.Next() )
{
Console::WriteLine( "FACE" );
}
I get lots of Faces, but if I try the more general approach,
for( TopExp_Explorer it( shape, TopAbs_ShapeEnum::TopAbs_SHAPE ); it.More(); it.Next() )
{
Console::WriteLine( "SHAPE" );
}
I dont get anything.
Any ideas?
Thanks, Kuni
Thu, 09/27/2007 - 18:10
Am I missing the role of TopAbs_SHAPE?
From the example under "5.4.1 Use of TopTools_Map" in the OCC "Modeling Data User's Guide" I would assume, that every kind of topology entity, like vertex, face, compound, etc. IS a TopAbs_SHAPE, so I can retrieve them all by querying simply for shapes. But this doesn't seem to be the case, TopAbs_SHAPE seems to be a seperate topology type. But why then is every other topology type inherited from TopAbs_SHAPE?
I am confused.
Regards, Kuni
Thu, 09/27/2007 - 18:38
From TopExp_Explorer.hxx:
//! * The type of Shapes to find : e.g VERTEX, EDGE.
//! This type cannot be SHAPE.
Grrrrrrr, why then is it in the examples?
Kuni
Fri, 09/28/2007 - 22:35
Hi, Kuni,
I am afraid that TopAbs_SHAPE doesn't mean a general shape. For example, if we check file topexp_explorer.hxx, we can find that ToAvoid has default value as TopAbs_SHAPE, while it doen't mean that you will avoid any shape. So we can have the conclusion that TopAbs_SHAPE is not a general shape but just for None shape.
I have the same question that there are much more faces than what I want. In fact, I just need those faces for triangulation and I find that lots of faces with Orientation 0. So I may plan to omit those one and only target faces with orientation as 1. I am not sure whether I may miss some faces and it is my 2 cents.
Best regard,
Wei