X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGEOMAlgo%2FGEOMAlgo_FinderShapeOn.cxx;h=f3834064aea1e6cd97eff3ab1d9dec5377a39b78;hb=bef7e3cbcdce0bb09e953394ecdbfb3972a75f27;hp=4708ce5540c3d659e5a6d67f6c265b75c1601c0f;hpb=73555c78ebf12a1fdb85157b8e7934ad566ae90a;p=modules%2Fgeom.git diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx index 4708ce554..f3834064a 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -6,7 +6,7 @@ // 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 -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,11 +26,7 @@ #include -#include - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version #include -#endif #include @@ -64,7 +60,6 @@ #include #include -#include #include #include @@ -72,7 +67,10 @@ #include #include #include -#include +#include + +#include +#include //======================================================================= //function : GEOMAlgo_FinderShapeOn @@ -267,7 +265,7 @@ void GEOMAlgo_FinderShapeOn::Find() return; } // - bICS=GEOMAlgo_Tools::IsCompositeShape(myArg2); + bICS=GEOMAlgo_AlgoTools::IsCompositeShape(myArg2); if (!bICS || myIsAnalytic) { TopoDS_Compound aCmp; BRep_Builder aBB; @@ -299,23 +297,21 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) { myErrorStatus=0; // - Standard_Boolean bIsDone; Standard_Integer i, iErr; TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON}; TopTools_ListIteratorOfListOfShape aIt; - BOPTools_DSFiller aDF; + BOPCol_ListOfShape aLS; + BOPAlgo_PaveFiller aPF; // // 1. Prepare DSFiller - aDF.SetShapes (myArg1, aS); - bIsDone=aDF.IsDone(); - if (!bIsDone) { - myErrorStatus=30; // wrong args are used for DSFiller - return; - } - aDF.Perform(); - bIsDone=aDF.IsDone(); - if (!bIsDone) { - myErrorStatus=31; // DSFiller failed + aLS.Append(myArg1); + aLS.Append(aS); + aPF.SetArguments(aLS); + // + aPF.Perform(); + iErr=aPF.ErrorStatus(); + if (iErr) { + myErrorStatus=31; // PaveFiller is failed return; } // @@ -347,7 +343,7 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) return; } // - pSS->SetFiller(aDF); + pSS->SetFiller(aPF); pSS->Perform(); iErr=pSS->ErrorStatus(); if (iErr) { @@ -391,11 +387,8 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1() // // Argument 1 if (!myIsAnalytic) { -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version aMF.Init(mySurface, Standard_True, Precision::Confusion()); -#else - aMF.Init(mySurface, Standard_True); -#endif + aFErr=aMF.Error(); if (aFErr!=BRepLib_FaceDone) { myErrorStatus=20; // can not build the face @@ -409,6 +402,7 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1() aM.Add(aF); TopExp::MapShapes(aF, TopAbs_VERTEX, aM); TopExp::MapShapes(aF, TopAbs_EDGE, aM); + aNb=aM.Extent(); for (i=1; i<=aNb; ++i) { const TopoDS_Shape& aS=aM(i);