]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022512: [CEA 1073] FuseCollinearEdgesWithinWire makes the orginal shape invalid
authorskv <skv@opencascade.com>
Wed, 9 Apr 2014 08:38:15 +0000 (12:38 +0400)
committerskv <skv@opencascade.com>
Wed, 9 Apr 2014 08:38:15 +0000 (12:38 +0400)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx

index 1ea14d97ba87aac8cd6b7ba8327f6c7275a8ab3d..86ee0fa9500e71f9eac301efbb80a0d7872b4c28 100644 (file)
@@ -991,8 +991,11 @@ TopoDS_Edge GEOMImpl_ShapeDriver::MakeEdgeFromWire(const TopoDS_Shape& aWire,
         if (CurveSeq(1)->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve)))
           CurveSeq(1) = (*((Handle(Geom_TrimmedCurve)*)&(CurveSeq(1))))->BasisCurve();
 
-        CurveSeq(1)->Transform(LocSeq(1).Location().Transformation());
-        ResEdge = BRepLib_MakeEdge(CurveSeq(1),
+        Handle(Geom_Curve) aNewCurve =
+          Handle(Geom_Curve)::DownCast(CurveSeq(1)->Copy());
+
+        aNewCurve->Transform(LocSeq(1).Location().Transformation());
+        ResEdge = BRepLib_MakeEdge(aNewCurve,
                                    FirstVtx_final, LastVtx_final,
                                    FparSeq(1), LparSeq(1));
       }