0029814: Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of...
[occt.git] / src / ShapeFix / ShapeFix_Shape.cxx
index 9ed6db1..44a7d16 100644 (file)
@@ -147,9 +147,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
     Standard_Integer savFixSameParameterMode = myFixSameParameterMode;
     myFixSameParameterMode = Standard_False;
     myFixVertexTolMode = Standard_False;
-    Standard_Integer aShapesNb = 0;
-    for ( TopoDS_Iterator anIter(S); anIter.More(); anIter.Next() )
-      ++aShapesNb;
+    Standard_Integer aShapesNb = S.NbChildren();
 
     // Open progress indication scope for sub-shape fixing
     Message_ProgressSentry aPSentrySubShape(theProgress, "Fixing sub-shape", 0, aShapesNb, 1);