From 16b1496f137a2f1883d60c279863c5151cee7bf4 Mon Sep 17 00:00:00 2001 From: dbv Date: Fri, 29 May 2015 10:24:23 +0300 Subject: [PATCH] Boolean cut fix --- src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) 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); + } } } -- 2.39.2