Salome HOME
1) Fix for issue 0022706 with MakePipeTShape (workaround for Fillet problem)
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ChamferDriver.cxx
index e845c72a71a9f396ff63766943f0ec978015fdb7..f7582ecfd7a2ab649aa9199666ac9edc8de25772 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <Standard_Stream.hxx>
-
 #include <GEOMImpl_ChamferDriver.hxx>
 #include <GEOMImpl_IChamfer.hxx>
 #include <GEOMImpl_Types.hxx>
 #include <GEOMImpl_ILocalOperations.hxx>
 #include <GEOMImpl_Block6Explorer.hxx>
-
+#include <GEOMUtils.hxx>
 #include <GEOM_Function.hxx>
 
 #include <BRepLib.hxx>
 #include <BRepTools.hxx>
 #include <BRepFilletAPI_MakeChamfer.hxx>
 
-#include <ShapeFix_Shape.hxx>
-#include <ShapeFix_ShapeTolerance.hxx>
-
 #include <TopAbs.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Iterator.hxx>
-#include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 
-#include <Precision.hxx>
-#include <gp_Pnt.hxx>
 #include <StdFail_NotDone.hxx>
 
 //=======================================================================
@@ -63,7 +55,6 @@ const Standard_GUID& GEOMImpl_ChamferDriver::GetID()
   return aChamferDriver;
 }
 
-
 //=======================================================================
 //function : GEOMImpl_ChamferDriver
 //purpose  :
@@ -269,12 +260,7 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const
   if (aShape.IsNull()) return 0;
 
   // reduce tolerances
-  ShapeFix_ShapeTolerance aSFT;
-  aSFT.LimitTolerance(aShape, Precision::Confusion(),
-                      Precision::Confusion(), TopAbs_SHAPE);
-  Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
-  aSfs->Perform();
-  aShape = aSfs->Shape();
+  GEOMUtils::FixShapeTolerance( aShape );
 
   // fix SameParameter flag
   BRepLib::SameParameter(aShape, 1.E-5, Standard_True);