mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -39,7 +39,6 @@
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Shell.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shell.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
//
|
||||
|
@@ -712,8 +712,7 @@ Standard_Boolean BOPAlgo_Tools::WiresToFaces(const TopoDS_Shape& theWires,
|
||||
BOPTools_AlgoTools::CorrectShapeTolerances(aRFaces, aMEmpty, Standard_False);
|
||||
//
|
||||
theFaces = aRFaces;
|
||||
TopoDS_Iterator aItF(theFaces);
|
||||
return aItF.More();
|
||||
return theFaces.NbChildren() > 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
Reference in New Issue
Block a user