mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0029814: Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of sub-shapes number
TopoDS_Shape::NbChildren() - new method has been introduced. TopoDS_Shape.lxx, TopoDS_TShape.lxx - inline methods have been moved to hxx. TopoDS_TShape_Flags has been redeclared as enumeration instead of preprocessor macros. Cyclic dependency between headers TopoDS_Shape.hxx and TopoDS_TShape.hxx eliminated. Places where TopoDS_Iterator is used only for calculation of number of sub-shapes are updated to use NbChildren() instead
This commit is contained in:
@@ -1957,9 +1957,7 @@ Standard_Boolean XCAFDoc_ShapeTool::updateComponent(const TDF_Label& theItemLabe
|
||||
// Compare the number of components in XDE structure with the number of
|
||||
// components in topological structure. A component may happen to be removed,
|
||||
// so we have to update the assembly compound
|
||||
Standard_Integer aNumTopoComponents = 0;
|
||||
for ( TopoDS_Iterator aTopIt(aCurrentRootShape); aTopIt.More(); aTopIt.Next() )
|
||||
aNumTopoComponents++;
|
||||
Standard_Integer aNumTopoComponents = aCurrentRootShape.NbChildren();
|
||||
//
|
||||
if ( aNumTopoComponents != aComponentLabs.Length() )
|
||||
isModified = Standard_True;
|
||||
|
Reference in New Issue
Block a user