From e0571928a6d6450b3f97020e296ec97f47289420 Mon Sep 17 00:00:00 2001 From: dbv Date: Thu, 5 May 2016 17:30:31 +0300 Subject: [PATCH] Issue #1411: Updated volume check --- src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp | 10 +++++----- src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp | 6 +++--- src/FeaturesPlugin/FeaturesPlugin_Partition.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp index fcbcdc78e..6e0d65be1 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp @@ -160,7 +160,7 @@ void FeaturesPlugin_Boolean::execute() return; } - if(GeomAlgoAPI_ShapeTools::volume(aBoolAlgo.shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aBoolAlgo.shape()) > 1.e-27) { std::shared_ptr aResultBody = document()->createBody(data(), aResultIndex); loadNamingDS(aResultBody, anObject, aTools, aBoolAlgo.shape(), aBoolAlgo, *aBoolAlgo.mapOfSubShapes().get()); setResult(aResultBody, aResultIndex); @@ -228,7 +228,7 @@ void FeaturesPlugin_Boolean::execute() aMakeShapeList.appendAlgo(aFillerAlgo); aMapOfShapes.merge(aFillerAlgo->mapOfSubShapes()); - if(GeomAlgoAPI_ShapeTools::volume(aFillerAlgo->shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aFillerAlgo->shape()) > 1.e-27) { std::shared_ptr aResultBody = document()->createBody(data(), aResultIndex); loadNamingDS(aResultBody, aCompSolid, aTools, aFillerAlgo->shape(), aMakeShapeList, aMapOfShapes); setResult(aResultBody, aResultIndex); @@ -297,7 +297,7 @@ void FeaturesPlugin_Boolean::execute() aOneObjectList.push_back(*anIt); std::shared_ptr aCutAlgo(new GeomAlgoAPI_Boolean(aOneObjectList, aShapesToAdd, GeomAlgoAPI_Boolean::BOOL_CUT)); - if(GeomAlgoAPI_ShapeTools::volume(aCutAlgo->shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aCutAlgo->shape()) > 1.e-27) { aSolidsToFuse.push_back(aCutAlgo->shape()); aMakeShapeList.appendAlgo(aCutAlgo); aMapOfShapes.merge(aCutAlgo->mapOfSubShapes()); @@ -433,7 +433,7 @@ void FeaturesPlugin_Boolean::execute() aShapesToAdd, GeomAlgoAPI_Boolean::BOOL_CUT)); - if(GeomAlgoAPI_ShapeTools::volume(anObjectsCutAlgo->shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(anObjectsCutAlgo->shape()) > 1.e-27) { aShapesToSmash.clear(); aShapesToSmash.push_back(anObjectsCutAlgo->shape()); aMakeShapeList.appendAlgo(anObjectsCutAlgo); @@ -445,7 +445,7 @@ void FeaturesPlugin_Boolean::execute() aShapesToAdd, GeomAlgoAPI_Boolean::BOOL_CUT)); - if(GeomAlgoAPI_ShapeTools::volume(aToolsCutAlgo->shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aToolsCutAlgo->shape()) > 1.e-27) { aTools.clear(); aTools.push_back(aToolsCutAlgo->shape()); aMakeShapeList.appendAlgo(aToolsCutAlgo); diff --git a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp index 89d4d54a4..507cd2da4 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp @@ -146,7 +146,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools, return false; } - if(GeomAlgoAPI_ShapeTools::volume(aBoolAlgo->shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aBoolAlgo->shape()) > 1.e-27) { theObjects.push_back(anObject); theMakeShapes.push_back(aBoolAlgo); } @@ -196,7 +196,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools, aMakeShapeList->appendAlgo(aFillerAlgo); - if(GeomAlgoAPI_ShapeTools::volume(aFillerAlgo->shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aFillerAlgo->shape()) > 1.e-27) { theObjects.push_back(aCompSolid); theMakeShapes.push_back(aMakeShapeList); } @@ -276,7 +276,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools, std::shared_ptr aCutAlgo(new GeomAlgoAPI_Boolean(aSolidsToFuse, aShapesToAdd, GeomAlgoAPI_Boolean::BOOL_CUT)); - if(aCutAlgo->isDone() && GeomAlgoAPI_ShapeTools::volume(aCutAlgo->shape()) > 1.e-7) { + if(aCutAlgo->isDone() && GeomAlgoAPI_ShapeTools::volume(aCutAlgo->shape()) > 1.e-27) { aSolidsToFuse.clear(); aSolidsToFuse.push_back(aCutAlgo->shape()); aMakeShapeList->appendAlgo(aCutAlgo); diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp index 66a64ba43..74e68707e 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp @@ -127,7 +127,7 @@ void FeaturesPlugin_Partition::execute() return; } - if (GeomAlgoAPI_ShapeTools::volume(aPartitionAlgo->shape()) > 1.e-7) { + if (GeomAlgoAPI_ShapeTools::volume(aPartitionAlgo->shape()) > 1.e-27) { std::shared_ptr aResultBody = document()->createBody(data(), aResultIndex); aMakeShapeList.appendAlgo(aPartitionAlgo); GeomAPI_DataMapOfShapeShape& aMapOfShapes = *aPartitionAlgo->mapOfSubShapes().get(); @@ -162,7 +162,7 @@ void FeaturesPlugin_Partition::execute() return; } - if (GeomAlgoAPI_ShapeTools::volume(aPartitionAlgo->shape()) > 1.e-7) { + if (GeomAlgoAPI_ShapeTools::volume(aPartitionAlgo->shape()) > 1.e-27) { std::shared_ptr aResultBody = document()->createBody(data(), aResultIndex); GeomAlgoAPI_MakeShapeList aMakeShapeListCopy = aMakeShapeList; aMakeShapeListCopy.appendAlgo(aPartitionAlgo); -- 2.39.2