]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
[bos #29103] EDF 24802 - limitation of tolerance
authorjfa <jfa@opencascade.com>
Sat, 5 Mar 2022 07:34:20 +0000 (10:34 +0300)
committerjfa <jfa@opencascade.com>
Sat, 5 Mar 2022 07:34:20 +0000 (10:34 +0300)
src/GEOMImpl/GEOMImpl_HealingDriver.cxx

index 37ad7985523ccd043875b279e9af2ff05f7082d0..a360ae96d45067cf031e88bf63fc2cc4001ea70e 100644 (file)
@@ -44,6 +44,7 @@
 
 #include <BRep_Builder.hxx>
 #include <BRepAdaptor_Curve.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
 #include <BRepTools_WireExplorer.hxx>
 
 #include <TopExp.hxx>
@@ -645,8 +646,14 @@ void GEOMImpl_HealingDriver::LimitTolerance (GEOMImpl_IHealing* theHI,
   // 1. Make a copy to prevent the original shape changes.
   TopoDS_Shape aShapeCopy;
   {
-    TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
-    TNaming_CopyShape::CopyTool(theOriginalShape, aMapTShapes, aShapeCopy);
+    BRepBuilderAPI_Copy aMC (theOriginalShape);
+    if (aMC.IsDone()) {
+      aShapeCopy = aMC.Shape();
+    }
+    else {
+      TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
+      TNaming_CopyShape::CopyTool(theOriginalShape, aMapTShapes, aShapeCopy);
+    }
   }
 
   // 2. Limit tolerance.