X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Union.cpp;h=7cafc45fe2ac74ebbbb9099a35926fc92c5b4888;hb=596cc06a3cdc89783d15e893e7da4b6b882fb442;hp=1d97c92aa1f043bd68d75d73d58a5a4c737c932b;hpb=a1047513fdbe3d6d6681e132047cbd4fb565ac33;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Union.cpp b/src/FeaturesPlugin/FeaturesPlugin_Union.cpp index 1d97c92aa..7cafc45fe 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Union.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Union.cpp @@ -34,7 +34,8 @@ void FeaturesPlugin_Union::execute() std::map, ListOfShape> aCompSolidsObjects; // Getting objects. - AttributeSelectionListPtr anObjectsSelList = selectionList(FeaturesPlugin_Union::BASE_OBJECTS_ID()); + AttributeSelectionListPtr anObjectsSelList = + selectionList(FeaturesPlugin_Union::BASE_OBJECTS_ID()); for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) { AttributeSelectionPtr anObjectAttr = anObjectsSelList->value(anObjectsIndex); std::shared_ptr anObject = anObjectAttr->value(); @@ -45,7 +46,8 @@ void FeaturesPlugin_Union::execute() ResultCompSolidPtr aResCompSolidPtr = ModelAPI_Tools::compSolidOwner(aContext); if(aResCompSolidPtr.get()) { std::shared_ptr aContextShape = aResCompSolidPtr->shape(); - std::map, ListOfShape>::iterator anIt = aCompSolidsObjects.begin(); + std::map, ListOfShape>::iterator + anIt = aCompSolidsObjects.begin(); for(; anIt != aCompSolidsObjects.end(); anIt++) { if(anIt->first->isEqual(aContextShape)) { aCompSolidsObjects[anIt->first].push_back(anObject); @@ -60,9 +62,11 @@ void FeaturesPlugin_Union::execute() } } - // Collecting solids from compsolids which will not be modified in boolean operation and will be added to result. + // Collecting solids from compsolids which will not be modified in + // boolean operation and will be added to result. ListOfShape aShapesToAdd; - for(std::map, ListOfShape>::iterator anIt = aCompSolidsObjects.begin(); + for(std::map, ListOfShape>::iterator + anIt = aCompSolidsObjects.begin(); anIt != aCompSolidsObjects.end(); anIt++) { std::shared_ptr aCompSolid = anIt->first; ListOfShape& aUsedInOperationSolids = anIt->second; @@ -92,8 +96,8 @@ void FeaturesPlugin_Union::execute() ListOfShape aTools; aTools.splice(aTools.begin(), anObjects, anObjects.begin()); std::shared_ptr aFuseAlgo(new GeomAlgoAPI_Boolean(anObjects, - aTools, - GeomAlgoAPI_Boolean::BOOL_FUSE)); + aTools, + GeomAlgoAPI_Boolean::BOOL_FUSE)); // Checking that the algorithm worked properly. GeomAlgoAPI_MakeShapeList aMakeShapeList; @@ -122,7 +126,8 @@ void FeaturesPlugin_Union::execute() // Combine result with not used solids from compsolid. if(aShapesToAdd.size() > 0) { aShapesToAdd.push_back(aShape); - std::shared_ptr aFillerAlgo(new GeomAlgoAPI_PaveFiller(aShapesToAdd, true)); + std::shared_ptr aFillerAlgo( + new GeomAlgoAPI_PaveFiller(aShapesToAdd, true)); if(!aFillerAlgo->isDone()) { setError("Error: PaveFiller algorithm failed."); return; @@ -144,7 +149,8 @@ void FeaturesPlugin_Union::execute() // Store result and naming. const int aModifyTag = 1; const int aDeletedTag = 2; - const int aSubsolidsTag = 3; /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids + /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids + const int aSubsolidsTag = 3; const std::string aModName = "Modified"; std::shared_ptr aResultBody = document()->createBody(data());