]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for issue #741: boolean may produce compounds of solids
authormpv <mpv@opencascade.com>
Thu, 9 Jul 2015 10:22:07 +0000 (13:22 +0300)
committermpv <mpv@opencascade.com>
Thu, 9 Jul 2015 10:22:07 +0000 (13:22 +0300)
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp

index 4783e23b1540a16ba26118297d41d40bf4f08882..e15cf507aad3b7bf5c86a83ecf965627f822182e 100644 (file)
@@ -202,12 +202,14 @@ void FeaturesPlugin_CompositeBoolean::LoadNamingDS(std::shared_ptr<ModelAPI_Resu
   if(theBaseShape->isEqual(theAlgo.shape())) {
     theResultBody->store(theAlgo.shape());
   } else {
-    theResultBody->storeModified(theBaseShape, theAlgo.shape());
+    const int aModTag = 1;
+    const int aDeleteTag = 2;
+    const int aSubsolidsTag=3; /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
+
+    theResultBody->storeModified(theBaseShape, theAlgo.shape(), aSubsolidsTag);
 
     GeomAPI_DataMapOfShapeShape* aSubShapes = new GeomAPI_DataMapOfShapeShape();
 
-    const int aModTag = 1;
-    const int aDeleteTag = 2;
     const std::string aModName = "Modified";
     theResultBody->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE,
                                                aModTag, aModName, *theAlgo.mapOfShapes().get());