]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix tool long line problem
authormpv <mpv@opencascade.com>
Tue, 16 Feb 2021 09:59:42 +0000 (12:59 +0300)
committermpv <mpv@opencascade.com>
Tue, 16 Feb 2021 09:59:42 +0000 (12:59 +0300)
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp

index 70ba0ddbd083eefa041b8acb1e820d23f9243a6d..cec6431f29cbef5e670aefc36e13c57e925dad66 100644 (file)
@@ -126,7 +126,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
   // Getting objects.
   ListOfShape anObjects, anEdgesAndFaces, aCompSolids;
   std::map<GeomShapePtr, ListOfShape> aCompSolidsObjects;
   // Getting objects.
   ListOfShape anObjects, anEdgesAndFaces, aCompSolids;
   std::map<GeomShapePtr, ListOfShape> aCompSolidsObjects;
-  bool aCompoundsOnly = true; // if there are only compounds and no compsolids, do not use filler to restore compsolids
+  bool aCompoundsOnly = true;// if there are only compounds, do not use filler restoring compsolids
   AttributeSelectionListPtr anObjectsSelList = myFeature->selectionList(OBJECTS_ID());
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
     AttributeSelectionPtr anObjectAttr = anObjectsSelList->value(anObjectsIndex);
   AttributeSelectionListPtr anObjectsSelList = myFeature->selectionList(OBJECTS_ID());
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
     AttributeSelectionPtr anObjectAttr = anObjectsSelList->value(anObjectsIndex);
@@ -232,20 +232,21 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
         GeomShapePtr aBoolRes = aBoolAlgo->shape();
         if (!aShapesToAdd.empty()) {
           aShapesToAdd.push_back(aBoolRes);
         GeomShapePtr aBoolRes = aBoolAlgo->shape();
         if (!aShapesToAdd.empty()) {
           aShapesToAdd.push_back(aBoolRes);
-          if (aCompoundsOnly) // 23885: if there are no compsolids in input, do not use filler to make compsolids
-          {
+          if (aCompoundsOnly)
+          {  // 23885: if there are no compsolids in input, do not use filler to make compsolids
             aBoolRes = GeomAlgoAPI_CompoundBuilder::compound(aShapesToAdd);
             aBoolRes = GeomAlgoAPI_CompoundBuilder::compound(aShapesToAdd);
-            std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aComp(new GeomAlgoAPI_MakeShapeCustom);
-            aComp->setResult(aBoolRes);
-            for(ListOfShape::iterator aComps = aCompSolids.begin(); aComps != aCompSolids.end(); aComps++)
-              aComp->addModified(*aComps, aBoolRes);
-            aMakeShapeList->appendAlgo(aComp);
+            std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aCompMkr(new GeomAlgoAPI_MakeShapeCustom);
+            aCompMkr->setResult(aBoolRes);
+            for(ListOfShape::iterator aCS = aCompSolids.begin(); aCS != aCompSolids.end(); aCS++)
+              aCompMkr->addModified(*aCS, aBoolRes);
+            aMakeShapeList->appendAlgo(aCompMkr);
           }
           else
           {
             std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(
               new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
           }
           else
           {
             std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(
               new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
-            if (!aFillerAlgo->isDone() || aFillerAlgo->shape()->isNull() || !aFillerAlgo->isValid()) {
+            if (!aFillerAlgo->isDone() || aFillerAlgo->shape()->isNull() || !aFillerAlgo->isValid())
+            {
               myFeature->setError("Error: PaveFiller algorithm failed.");
               return false;
             }
               myFeature->setError("Error: PaveFiller algorithm failed.");
               return false;
             }