From: skv Date: Wed, 9 Apr 2014 08:38:15 +0000 (+0400) Subject: 0022512: [CEA 1073] FuseCollinearEdgesWithinWire makes the orginal shape invalid X-Git-Tag: V7_4_0b1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c2e6c12db3c547ea043f3b1f067409e2445a569e;p=modules%2Fgeom.git 0022512: [CEA 1073] FuseCollinearEdgesWithinWire makes the orginal shape invalid --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 1ea14d97b..86ee0fa95 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -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)); }