X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGEOMAlgo%2FGEOMAlgo_FinderShapeOn1.cxx;h=863fae5b63f1f9da7d250f7771d07975fbdafb30;hb=882dc8f6ee23cedf50cf3c718fb864dec115b35e;hp=6a8f33bb4f711469c3e48b038ea4ad0c38d20f91;hpb=9499b99fe2dcb53e1ea364f97986f8f432b04600;p=modules%2Fgeom.git diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx index 6a8f33bb4..863fae5b6 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx @@ -1,31 +1,31 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_FinderShapeOn1.cxx -// Created: Fri Mar 4 10:31:06 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_FinderShapeOn1.cxx +// Created: Fri Mar 4 10:31:06 2005 +// Author: Peter KURNEV #include -#include +#include #include #include @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -67,16 +68,18 @@ #include #include -#include -#include -#include + #include #include +#include +#include +#include +#include //======================================================================= //function : GEOMAlgo_FinderShapeOn1 -//purpose : +//purpose : //======================================================================= GEOMAlgo_FinderShapeOn1::GEOMAlgo_FinderShapeOn1() : @@ -90,14 +93,14 @@ GEOMAlgo_FinderShapeOn1::GEOMAlgo_FinderShapeOn1() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_FinderShapeOn1::~GEOMAlgo_FinderShapeOn1() { } //======================================================================= //function : SetSurface -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::SetSurface(const Handle(Geom_Surface)& aS) { @@ -105,7 +108,7 @@ void GEOMAlgo_FinderShapeOn1::SetSurface(const Handle(Geom_Surface)& aS) } //======================================================================= //function : Surface -//purpose : +//purpose : //======================================================================= const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn1::Surface() const { @@ -113,7 +116,7 @@ const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn1::Surface() const } //======================================================================= //function : SetShapeType -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::SetShapeType(const TopAbs_ShapeEnum aType) { @@ -121,7 +124,7 @@ void GEOMAlgo_FinderShapeOn1::SetShapeType(const TopAbs_ShapeEnum aType) } //======================================================================= //function : ShapeType -//purpose : +//purpose : //======================================================================= TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn1::ShapeType()const { @@ -129,7 +132,7 @@ TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn1::ShapeType()const } //======================================================================= //function : SetState -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::SetState(const GEOMAlgo_State aState) { @@ -137,7 +140,7 @@ void GEOMAlgo_FinderShapeOn1::SetState(const GEOMAlgo_State aState) } //======================================================================= //function : State -//purpose : +//purpose : //======================================================================= GEOMAlgo_State GEOMAlgo_FinderShapeOn1::State() const { @@ -145,7 +148,7 @@ GEOMAlgo_State GEOMAlgo_FinderShapeOn1::State() const } //======================================================================= //function : SetNbPntsMin -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::SetNbPntsMin(const Standard_Integer aNb) { @@ -153,7 +156,7 @@ void GEOMAlgo_FinderShapeOn1::SetNbPntsMin(const Standard_Integer aNb) } //======================================================================= //function : NbPntsMin -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMin()const { @@ -161,7 +164,7 @@ Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMin()const } //======================================================================= //function : SetNbPntsMax -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::SetNbPntsMax(const Standard_Integer aNb) { @@ -169,7 +172,7 @@ void GEOMAlgo_FinderShapeOn1::SetNbPntsMax(const Standard_Integer aNb) } //======================================================================= //function : NbPntsMax -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMax()const { @@ -177,7 +180,7 @@ Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMax()const } //======================================================================= // function: MSS -// purpose: +// purpose: //======================================================================= const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn1::MSS() const { @@ -185,7 +188,7 @@ const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn1::MSS() const } //======================================================================= // function: Shapes -// purpose: +// purpose: //======================================================================= const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn1::Shapes() const { @@ -206,7 +209,7 @@ const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn1::Shapes() const } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::Perform() { @@ -248,12 +251,12 @@ void GEOMAlgo_FinderShapeOn1::Perform() } // // 4 - ProcessSolids(); + ProcessSolids(); // } //======================================================================= //function : ProcessVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::ProcessVertices() { @@ -276,7 +279,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessVertices() // if (myShapeType==TopAbs_VERTEX){ if (bIsConformState) { - myMSS.Add(aV, aSt); + myMSS.Add(aV, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -286,7 +289,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessVertices() } //======================================================================= //function : ProcessEdges -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::ProcessEdges() { @@ -316,11 +319,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() // bIsConformState=myMSS.Contains(aV); if (!bIsConformState) { - break;// vertex has non-conformed state + break;// vertex has non-conformed state } else { - aSt=myMSS.FindFromKey(aV); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aV); + aSC.AppendState(aSt); } } // @@ -329,13 +332,13 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() } // if (BRep_Tool::Degenerated(aE)) { - myMSS.Add(aE, aSt); + myMSS.Add(aE, aSt); continue; } // if (myState==GEOMAlgo_ST_ON && aType1==GeomAbs_Sphere) { Standard_Real aT1, aT2; - Handle(Geom_Curve) aC; + Handle(Geom_Curve) aC; GeomAdaptor_Curve aGAC; GeomAbs_CurveType aType2; // @@ -344,48 +347,48 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() // aType2=aGAC.GetType(); if (aType2==GeomAbs_Line) { - continue; + continue; } } // InnerPoints(aE, aLP); if (myErrorStatus) { - return; + return; } // bIsConformState=Standard_True; aIt.Initialize(aLP); for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } + if (iCnt > myNbPntsMax) { + break; + } } // const gp_Pnt& aP=aIt.Value(); aSt = GetPointState( aP ); bIsToBreak=aSC.AppendState(aSt); if (bIsToBreak) { - break; + break; } } // - aSt=aSC.State(); + aSt=aSC.State(); // bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_EDGE) { if (bIsConformState) { - myMSS.Add(aE, aSt); + myMSS.Add(aE, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { myMSS.Add(aE, aSt); } - } // for (i=1; i<=aNb; ++i) next edge + } // for (i=1; i<=aNb; ++i) next edge } //======================================================================= //function : ProcessFaces -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::ProcessFaces() { @@ -417,7 +420,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() aGAS.Load(aS); aType2=aGAS.GetType(); if (aType2!=aType1) { - continue; + continue; } } // @@ -426,11 +429,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() const TopoDS_Shape& aE=aExp.Current(); bIsConformState=myMSS.Contains(aE); if (!bIsConformState) { - break;// edge has non-conformed state + break;// edge has non-conformed state } else { - aSt=myMSS.FindFromKey(aE); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aE); + aSC.AppendState(aSt); } } // @@ -447,35 +450,35 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() aIt.Initialize(aLP); for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } + if (iCnt > myNbPntsMax) { + break; + } } // const gp_Pnt& aP=aIt.Value(); aSt = GetPointState( aP ); bIsToBreak=aSC.AppendState(aSt); if (bIsToBreak) { - break; + break; } } // - aSt=aSC.State(); + aSt=aSC.State(); // bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_FACE) { if (bIsConformState) { - myMSS.Add(aF, aSt); + myMSS.Add(aF, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { myMSS.Add(aF, aSt); } - }// for (i=1; i<=aNb; ++i) next face + }// for (i=1; i<=aNb; ++i) next face } //======================================================================= //function : ProcessSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::ProcessSolids() { @@ -499,11 +502,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids() const TopoDS_Shape& aF=aMF(j); bIsConformState=myMSS.Contains(aF); if (!bIsConformState) { - break;// face has non-conformed state + break;// face has non-conformed state } else { - aSt=myMSS.FindFromKey(aF); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aF); + aSC.AppendState(aSt); } } // @@ -511,7 +514,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids() continue; // face has non-conformed state,skip solid } // - aSt=aSC.State(); + aSt=aSC.State(); // bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (bIsConformState) { @@ -522,15 +525,14 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids() // //======================================================================= //function : InnerPoints -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, - GEOMAlgo_ListOfPnt& aLP) + GEOMAlgo_ListOfPnt& aLP) { myErrorStatus=0; // - Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNbMax, aNb; - Standard_Integer iCnt, *pIds; + Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds; TopLoc_Location aLoc; Handle(Poly_Triangulation) aTRF; TColStd_MapOfInteger aMBN; @@ -542,8 +544,11 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, // aTRF=BRep_Tool::Triangulation(aF, aLoc); if (aTRF.IsNull()) { - myErrorStatus=20; // no triangulation found - return; + if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) { + myWarningStatus=20; // no triangulation found + return; + } + aTRF=BRep_Tool::Triangulation(aF, aLoc); } // const gp_Trsf& aTrsf=aLoc.Transformation(); @@ -562,11 +567,11 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, // aPK.SetIds(n[k], n[k+1]); if (aMPKI.IsBound(aPK)) { - Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); - ++iCntX; + Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); + ++iCntX; } else { - aMPKI.Bind(aPK, 1); + aMPKI.Bind(aPK, 1); } } } @@ -578,16 +583,15 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, iCnt=aIt.Value(); if (iCnt==1) { const GEOMAlgo_PassKey& aPK=aIt.Key(); - aNbMax=aPK.NbMax(); - pIds=(Standard_Integer*)aPK.Key(); - for (k=1; k<3; ++k) { - aNx=*(pIds+aNbMax-k); - aMBN.Add(aNx); - } + // + aNx=(Standard_Integer)aPK.Id(1); + aMBN.Add(aNx); + aNx=(Standard_Integer)aPK.Id(2); + aMBN.Add(aNx); } } // - // inner nodes=all_nodes - boundary_nodes + // inner nodes=all_nodes - boundary_nodes j1=aNodes.Lower(); j2=aNodes.Upper(); for (j=j1; j<=j2; ++j) { @@ -599,7 +603,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, // aNb=aLP.Extent(); // - if (!aNb && myNbPntsMin) { + if (!aNb && myNbPntsMin) { // try to fill it yourself Standard_Boolean bIsDone; Standard_Integer aN1, aN2; @@ -615,96 +619,71 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, aNbLinks=aMPKI.Extent(); aIt.Initialize(aMPKI); for (; aIt.More(); aIt.Next()) { - iCnt=aIt.Value(); - if (iCnt>1) { - // take the first having occured inner link - // and discretize it - const GEOMAlgo_PassKey& aPK=aIt.Key(); - aNbMax=aPK.NbMax(); - pIds=(Standard_Integer*)aPK.Key(); - aN1=*(pIds+aNbMax-1); - aN2=*(pIds+aNbMax-2); - aP1=aNodes(aN1).Transformed(aTrsf); - aP2=aNodes(aN2).Transformed(aTrsf); - // - if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; - gp_Cylinder aCyl; - // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) - aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { - continue; - } - } - // - BRepLib_MakeEdge aBME(aP1, aP2); - bIsDone=aBME.IsDone(); - if (!bIsDone) { - myErrorStatus=30; //can not obtain the line fron the link - return; - } - // - const TopoDS_Shape& aSx=aBME.Shape(); - const TopoDS_Edge& aE=TopoDS::Edge(aSx); - // - InnerPoints(aE, myNbPntsMin, aLP); - break; - }// if (iCnt>1) + iCnt=aIt.Value(); + if (iCnt>1) { + // take the first having occured inner link + // and discretize it + const GEOMAlgo_PassKey& aPK=aIt.Key(); + // + aN1=(Standard_Integer)aPK.Id(1); + aN2=(Standard_Integer)aPK.Id(2); + // + aP1=aNodes(aN1).Transformed(aTrsf); + aP2=aNodes(aN2).Transformed(aTrsf); + // + if (aType==GeomAbs_Cylinder) { + Standard_Real aTolSM; + gp_Cylinder aCyl; + // + aTolSM=1.523e-6;//~1.-cos(0.1 deg) + aCyl=aGAS.Cylinder(); + if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { + continue; + } + } + // + BRepLib_MakeEdge aBME(aP1, aP2); + bIsDone=aBME.IsDone(); + if (!bIsDone) { + myErrorStatus=30; //can not obtain the line fron the link + return; + } + // + const TopoDS_Shape& aSx=aBME.Shape(); + const TopoDS_Edge& aE=TopoDS::Edge(aSx); + // + InnerPoints(aE, myNbPntsMin, aLP); + break; + }// if (iCnt>1) }// for (; aIt.More(); aIt.Next()) - }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) - }// if (!aNb && myNbPntsMin) { + }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) + }// if (!aNb && myNbPntsMin) { } +//modified by NIZNHY-PKV Thu Jan 26 09:56:20 2012f //======================================================================= //function : InnerPoints -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, - GEOMAlgo_ListOfPnt& aLP) + GEOMAlgo_ListOfPnt& aLP) { - myErrorStatus=0; + Standard_Integer aNbPntsMin; // - Standard_Integer j, aNbNodes, aIndex, aNb; - Handle(Poly_PolygonOnTriangulation) aPTE; - Handle(Poly_Triangulation) aTRE; - TopLoc_Location aLoc; - gp_Pnt aP; + myErrorStatus=0; + aNbPntsMin=21; // aLP.Clear(); - BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc); - if (aTRE.IsNull() || aPTE.IsNull()) { - myErrorStatus=20; // no triangulation found - return; - } - // - const gp_Trsf& aTrsf=aLoc.Transformation(); - const TColgp_Array1OfPnt& aNodes=aTRE->Nodes(); - // - aNbNodes=aPTE->NbNodes(); - const TColStd_Array1OfInteger& aInds=aPTE->Nodes(); - for (j=2; jD0(aT, aP); aLP.Append(aP); } + */ + aNbT=aNbPntsMin+1; + dT=(aT2-aT1)/aNbT; + for (j=1; jD0(aT, aP); + aLP.Append(aP); + } + //modified by NIZNHY-PKV Thu Jan 26 09:51:24 2012t } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::CheckData() { @@ -750,14 +740,14 @@ void GEOMAlgo_FinderShapeOn1::CheckData() } // if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { + myShapeType==TopAbs_EDGE || + myShapeType==TopAbs_FACE || + myShapeType==TopAbs_SOLID)) { myErrorStatus=12; // unallowed subshape type return; } // - if (myState==GEOMAlgo_ST_UNKNOWN || + if (myState==GEOMAlgo_ST_UNKNOWN || myState==GEOMAlgo_ST_INOUT) { myErrorStatus=13; // unallowed state type return; @@ -767,19 +757,19 @@ void GEOMAlgo_FinderShapeOn1::CheckData() // myGAS.Load(mySurface); aType=myGAS.GetType(); - if (!(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere)) { + if (!(aType==GeomAbs_Plane || + aType==GeomAbs_Cylinder || + aType==GeomAbs_Sphere)) { myErrorStatus=14; // unallowed surface type } } //======================================================================= //function : GetPointState -//purpose : +//purpose : //======================================================================= -TopAbs_State GEOMAlgo_FinderShapeOn1::GetPointState(const gp_Pnt& aP) +TopAbs_State GEOMAlgo_FinderShapeOn1::GetPointState(const gp_Pnt& aP) { TopAbs_State aSt; GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); @@ -792,63 +782,70 @@ TopAbs_State GEOMAlgo_FinderShapeOn1::GetPointState(const gp_Pnt& aP) // // 10 -mySurface=NULL // 11 -myShape=NULL -// 12 -unallowed type of subshapes -// 13 -unallowed state +// 12 -unallowed type of subshapes +// 13 -unallowed state // 14 -unallowed surface type // 15 -unallowed surface type // 20- no triangulation found // 30- can not obtain the line from the link - +//modified by NIZNHY-PKV Thu Jan 26 10:01:14 2012f /* -// Chronometer -#include -#include - -Standard_STATIC(OSD_Chronometer, x_S_Chrono); -static void x_StartChrono(); -static void x_StopChrono(); -static Standard_Boolean x_IsToShow(); -// //======================================================================= -//function : x_StartChrono -//purpose : +//function : InnerPoints +//purpose : //======================================================================= -void x_StartChrono() +void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, + GEOMAlgo_ListOfPnt& aLP) { - if (x_IsToShow()){ - x_S_Chrono().Reset(); - x_S_Chrono().Start(); + myErrorStatus=0; + // + Standard_Integer j, aNbNodes, aIndex, aNb; + Handle(Poly_PolygonOnTriangulation) aPTE; + Handle(Poly_Triangulation) aTRE; + TopLoc_Location aLoc; + gp_Pnt aP; + // + aLP.Clear(); + BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc); + if (aTRE.IsNull() || aPTE.IsNull()) { + Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc); + if (aPE.IsNull()) { + if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aE)) { + myErrorStatus=20; // no triangulation found + return; + } + aPE = BRep_Tool::Polygon3D(aE, aLoc); + } + const gp_Trsf& aTrsf=aLoc.Transformation(); + const TColgp_Array1OfPnt& aNodes=aPE->Nodes(); + // + aNbNodes=aPE->NbNodes(); + Standard_Integer low = aNodes.Lower(), up = aNodes.Upper(); + for (j=low+1; jNodes(); + // + aNbNodes=aPTE->NbNodes(); + const TColStd_Array1OfInteger& aInds=aPTE->Nodes(); + for (j=2; j