X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Intersection.cpp;h=8ab6a1b07dfdc14c465c10da63f8c777bfe4c608;hb=660930f24994da13c3a3ac089abfbfa20cb9b109;hp=4958c32485b79efa5a649bdab5a03f1e441a9d6f;hpb=947f4a46a1cccd1b6fe1ca746629396b6a71f631;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Intersection.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Intersection.cpp index 4958c3248..8ab6a1b07 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Intersection.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Intersection.cpp @@ -24,19 +24,22 @@ #include #include + //================================================================================================== -GeomAlgoAPI_Intersection::GeomAlgoAPI_Intersection(const ListOfShape& theObjects) +GeomAlgoAPI_Intersection::GeomAlgoAPI_Intersection(const ListOfShape& theObjects, const double theFuzzy) : myFiller(0) { - build(theObjects); + build(theObjects, theFuzzy); } +//================================================================================================== GeomAlgoAPI_Intersection::~GeomAlgoAPI_Intersection() { if (myFiller) delete (BOPAlgo_PaveFiller*)myFiller; } + //================================================================================================== -void GeomAlgoAPI_Intersection::build(const ListOfShape& theObjects) +void GeomAlgoAPI_Intersection::build(const ListOfShape& theObjects, const double theFuzzy) { if (theObjects.empty()) { return; @@ -64,6 +67,7 @@ void GeomAlgoAPI_Intersection::build(const ListOfShape& theObjects) aDSFiller->SetRunParallel(false); aDSFiller->SetNonDestructive(false); aDSFiller->SetGlue(BOPAlgo_GlueOff); + if (theFuzzy >= 1.e-7) aDSFiller->SetFuzzyValue(theFuzzy); // optimization for the issue #2399 BOPAlgo_SectionAttribute theSecAttr(Standard_True, @@ -79,6 +83,7 @@ void GeomAlgoAPI_Intersection::build(const ListOfShape& theObjects) anOperation->SetArguments(anObjects); anOperation->SetRunParallel(false); anOperation->SetCheckInverted(true); + if (theFuzzy >= 1.e-7) anOperation->SetFuzzyValue(theFuzzy); anOperation->PerformWithFiller(*aDSFiller); // it references a filler fields, so keep the filler myFiller = 0;