]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Model/Model_BodyBuilder.cpp
Salome HOME
Basing on the issue #1757 make extrusion-cut that
[modules/shaper.git] / src / Model / Model_BodyBuilder.cpp
index 8446d00cb0d548dc711a9de6c1da1a3868e86d05..9c51617f123342e7acef38dd23383c727a82fd27 100755 (executable)
@@ -317,14 +317,16 @@ void Model_BodyBuilder::buildName(const int theTag, const std::string& theName)
 
   TDataStd_Name::Set(builder(theTag)->NamedShape()->Label(), aName.c_str());
 }
-void Model_BodyBuilder::generated(const GeomShapePtr& theNewShape,
-                                  const std::string& theName)
+bool Model_BodyBuilder::generated(const GeomShapePtr& theNewShape,
+                                  const std::string& theName,
+                                  const bool theCheckIsInResult)
 {
   GeomShapePtr aResultShape = shape();
-
-  bool aNewShapeIsNotInResultShape = !aResultShape->isSubShape(theNewShape, false);
-  if (aNewShapeIsNotInResultShape) {
-    return;
+  if (theCheckIsInResult) {
+    bool aNewShapeIsNotInResultShape = !aResultShape->isSubShape(theNewShape, false);
+    if (aNewShapeIsNotInResultShape) {
+      return false;
+    }
   }
 
   TopoDS_Shape aShape = theNewShape->impl<TopoDS_Shape>();
@@ -349,6 +351,7 @@ void Model_BodyBuilder::generated(const GeomShapePtr& theNewShape,
     buildName(myFreePrimitiveTag, aName);
   }
   ++myFreePrimitiveTag;
+  return true;
 }
 
 void Model_BodyBuilder::generated(const GeomShapePtr& theOldShape,