]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2611: Partition of a solid belonging to a Compsolid
authorazv <azv@opencascade.com>
Thu, 27 Sep 2018 10:36:08 +0000 (13:36 +0300)
committerazv <azv@opencascade.com>
Thu, 27 Sep 2018 10:36:44 +0000 (13:36 +0300)
Fix failure in Partition if full compsolid is selected (do not place all its sub-solids to the list of unused shapes)

src/FeaturesPlugin/FeaturesPlugin_Partition.cpp

index 92658389ca0f9ce4696b6cc839a4ddf6c54226de..3ef472216f53143c2598369fd6724ab0dc04e991 100755 (executable)
@@ -343,6 +343,11 @@ void unusedSubsOfComposolid(const CompsolidSubs& theObjects, CompsolidSubs& theN
     if (aCSIt->first->shapeType() != GeomAPI_Shape::COMPSOLID)
       continue;
 
+    // check the compsolid is selected
+    if (aCSIt->second.size() == 1 && aCSIt->first->isEqual(aCSIt->second.front()))
+      continue;
+
+    // process all sub-solids of compsolid
     ListOfShape aNotUsedSolids;
     for (GeomAPI_ShapeExplorer anExp(aCSIt->first, GeomAPI_Shape::SOLID);
          anExp.more(); anExp.next()) {