Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeVolume.cpp
index 9dad362eaa3e60a7b5d3ac19f3eff84e2f66416f..f730342fdf58d1547395c6701556cade9d6fd4ee 100644 (file)
@@ -27,7 +27,7 @@
 //=================================================================================================
 std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_MakeVolume::make(const ListOfShape& theFaces)
 {
-  GeomAlgoAPI_MakeVolume aMkVolAlgo(theFaces);
+  GeomAlgoAPI_MakeVolume aMkVolAlgo(theFaces, false);
   GeomShapePtr aResult;
   if(aMkVolAlgo.isDone() && !aMkVolAlgo.shape()->isNull() && aMkVolAlgo.isValid())
     aResult = aMkVolAlgo.shape();
@@ -35,8 +35,10 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_MakeVolume::make(const ListOfShape& t
 }
 
 //=================================================================================================
-GeomAlgoAPI_MakeVolume::GeomAlgoAPI_MakeVolume(const ListOfShape& theFaces)
+GeomAlgoAPI_MakeVolume::GeomAlgoAPI_MakeVolume(
+  const ListOfShape& theFaces, const bool theAvoidInternal)
 {
+  myAvoidInternal = theAvoidInternal;
   build(theFaces);
 }
 
@@ -65,7 +67,7 @@ void GeomAlgoAPI_MakeVolume::build(const ListOfShape& theFaces)
   // parameters of the volume maker
   aVolumeMaker->SetArguments(anArgs);
   aVolumeMaker->SetIntersect(true); // split edges and faces
-  aVolumeMaker->SetAvoidInternalShapes(true);
+  aVolumeMaker->SetAvoidInternalShapes(myAvoidInternal);
   aVolumeMaker->SetGlue(BOPAlgo_GlueOff);
 
   // building and getting result