]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Boolean cut fix
authordbv <dbv@opencascade.com>
Fri, 29 May 2015 07:24:23 +0000 (10:24 +0300)
committerdbv <dbv@opencascade.com>
Fri, 29 May 2015 07:24:23 +0000 (10:24 +0300)
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp

index 471e5c7c08d0ba2eadb823da7e6a483e1e8469cf..96b7de83fde0c3401e1df443d948b78ef4aece15 100644 (file)
@@ -235,18 +235,22 @@ void FeaturesPlugin_Boolean::LoadNamingDS(std::shared_ptr<GeomAlgoAPI_MakeShapeL
                                           const ListOfShape& theTools)
 {
   //load result
-  theResultBody->storeModified(theObjects.front(), theResult);
+  if(theObjects.front()->isEqual(theResult)) {
+    theResultBody->store(theObjects.front());
+  } else {
+    theResultBody->storeModified(theObjects.front(), theResult);
 
-  GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
+    GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
 
-  std::string aModName = "Modified";
-  for(ListOfShape::const_iterator anIter = theObjects.begin(); anIter != theObjects.end(); anIter++) {
-    theResultBody->loadAndOrientModifiedShapes(theMakeShapeList.get(), *anIter, FACE, _MODIFY_TAG, aModName, *theDataMapOfShapes.get());
-    theResultBody->loadDeletedShapes(theMakeShapeList.get(), *anIter, FACE, _DELETED_TAG);
-  }
+    std::string aModName = "Modified";
+    for(ListOfShape::const_iterator anIter = theObjects.begin(); anIter != theObjects.end(); anIter++) {
+      theResultBody->loadAndOrientModifiedShapes(theMakeShapeList.get(), *anIter, FACE, _MODIFY_TAG, aModName, *theDataMapOfShapes.get());
+      theResultBody->loadDeletedShapes(theMakeShapeList.get(), *anIter, FACE, _DELETED_TAG);
+    }
 
-  for(ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++) {
-    theResultBody->loadAndOrientModifiedShapes(theMakeShapeList.get(), *anIter, FACE, _MODIFY_TAG, aModName, *theDataMapOfShapes.get());
-    theResultBody->loadDeletedShapes(theMakeShapeList.get(), *anIter, FACE, _DELETED_TAG);
+    for(ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++) {
+      theResultBody->loadAndOrientModifiedShapes(theMakeShapeList.get(), *anIter, FACE, _MODIFY_TAG, aModName, *theDataMapOfShapes.get());
+      theResultBody->loadDeletedShapes(theMakeShapeList.get(), *anIter, FACE, _DELETED_TAG);
+    }
   }
 }