However when I process my shape using the following functions:
int numberOfEntities(TopoDS_Shape shape, TopAbs_ShapeEnum type){
TopExp_Explorer *explorer = new TopExp_Explorer(shape, type);
int nu_entities = 0;
uncheckEntities(shape,type);
while (explorer->More()){
TopoDS_Shape entity = explorer->Current();
if(!entity.Checked()){
nu_entities++;
entity.Checked(true);
}
explorer->Next();
}
uncheckEntities(shape,type);
std::cout << "Faces " << nu_entities << std::endl;
return nu_entities;
}
void uncheckEntities(TopoDS_Shape shape, TopAbs_ShapeEnum type){
TopExp_Explorer *explorer = new TopExp_Explorer(shape, type);
while (explorer->More()) {
TopoDS_Shape entity = explorer->Current();
entity.Checked(false);
explorer->Next();
}
}
I get good results. Has anyone come across this problem before?