0028143: In the method ShapeFix_Edge::FixAddPCurve initialized by face location of...
[occt.git] / src / ShapeFix / ShapeFix_Edge.cxx
index 639e717..d1222ab 100644 (file)
@@ -153,7 +153,13 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
                                              const Standard_Boolean isSeam,
                                              const Standard_Real prec)
 {
-  Handle(ShapeAnalysis_Surface) sas = new ShapeAnalysis_Surface (surface);
+  Handle(Geom_Surface) aTransSurf = surface;
+  if( !location.IsIdentity())
+  {
+    gp_Trsf aTrsf(location);
+    aTransSurf = Handle(Geom_Surface)::DownCast(surface->Transformed(aTrsf));
+  }
+  Handle(ShapeAnalysis_Surface) sas = new ShapeAnalysis_Surface (aTransSurf);
   return FixAddPCurve (edge, surface, location, isSeam, sas, prec);
 }
 
@@ -466,7 +472,7 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
     Standard_Real preci = ( prec >0. ? prec : BRep_Tool::Tolerance(edge) );
     Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge, /*Loc,*/ First, Last);
     //  Handle(Geom_Curve) c3d = BRep_Tool::Curve(E, First, Last);
-    if (c3d.IsNull() || (Abs(Last-First) <Precision::PConfusion())) {
+    if (c3d.IsNull()) {
       myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL1);
       return Standard_False;
     }