diff --git a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx index 37ad79855..a360ae96d 100644 --- a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -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.