From: dbv Date: Fri, 29 May 2015 07:24:23 +0000 (+0300) Subject: Boolean cut fix X-Git-Tag: V_1.2.0~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=16b1496f137a2f1883d60c279863c5151cee7bf4;p=modules%2Fshaper.git Boolean cut fix --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp index 471e5c7c0..96b7de83f 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp @@ -235,18 +235,22 @@ void FeaturesPlugin_Boolean::LoadNamingDS(std::shared_ptrstoreModified(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); + } } }