0028143: In the method ShapeFix_Edge::FixAddPCurve initialized by face location of...
authorgka <gka@opencascade.com>
Tue, 22 Nov 2016 13:20:36 +0000 (16:20 +0300)
committerapn <apn@opencascade.com>
Wed, 23 Nov 2016 10:12:08 +0000 (13:12 +0300)
Class ShapeAnalysis::Surface is initialized by transformed surface in the method
ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,const TopoDS_Face& face, const Standard_Boolean isSeam, const Standard_Real prec) in the case when face has location.

src/ShapeFix/ShapeFix_Edge.cxx

index 6a68768..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);
 }