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:
@@ -2182,15 +2182,12 @@ static Standard_Real ComputeAveragePlaneAndMaxDeviation(const TopoDS_Shape& aWir
|
||||
gp_Pln& thePlane,
|
||||
Standard_Boolean& IsSingular)
|
||||
{
|
||||
Standard_Integer N = 40, nedges = 0;
|
||||
|
||||
TopoDS_Iterator iter( aWire );
|
||||
for (; iter.More(); iter.Next())
|
||||
nedges++;
|
||||
Standard_Integer N = 40;
|
||||
Standard_Integer nedges = aWire.NbChildren();
|
||||
|
||||
TColgp_Array1OfPnt Pnts( 1, nedges*N );
|
||||
Standard_Integer ind = 1, i;
|
||||
for (iter.Initialize(aWire); iter.More(); iter.Next())
|
||||
for (TopoDS_Iterator iter (aWire); iter.More(); iter.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge( iter.Value() );
|
||||
BRepAdaptor_Curve aCurve(anEdge);
|
||||
|
Reference in New Issue
Block a user