]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1411: Updated volume check
authordbv <dbv@opencascade.com>
Thu, 5 May 2016 14:30:31 +0000 (17:30 +0300)
committerdbv <dbv@opencascade.com>
Thu, 5 May 2016 14:38:12 +0000 (17:38 +0300)
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp

index fcbcdc78e0e84086e5103b570170aba4b3f3f450..6e0d65be1e9ac60fd73112bfe13bc922b4e052f1 100644 (file)
@@ -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<ModelAPI_ResultBody> 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<ModelAPI_ResultBody> 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<GeomAlgoAPI_Boolean> 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);
index 89d4d54a4cdc4574c29b9b978bb4671704b79f37..507cd2da4f7479b556e98867c088088828bd098d 100644 (file)
@@ -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<GeomAlgoAPI_Boolean> 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);
index 66a64ba435017e15ef2fa1c3853a286f408c3b40..74e68707e8fcece75c4a2a745691d4163521ea9f 100755 (executable)
@@ -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<ModelAPI_ResultBody> 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<ModelAPI_ResultBody> aResultBody = document()->createBody(data(), aResultIndex);
         GeomAlgoAPI_MakeShapeList aMakeShapeListCopy = aMakeShapeList;
         aMakeShapeListCopy.appendAlgo(aPartitionAlgo);