]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022512: Fix for regression after fix for 0022514
authorskv <skv@opencascade.com>
Fri, 11 Apr 2014 06:54:04 +0000 (10:54 +0400)
committerskv <skv@opencascade.com>
Fri, 11 Apr 2014 06:54:04 +0000 (10:54 +0400)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx

index 61b902d17901b17e8a1760f9c8ed6ca16e9161f0..360b94c83f5819a66d84817d3bc7d5cc8a23db31 100644 (file)
@@ -990,9 +990,23 @@ TopoDS_Edge GEOMImpl_ShapeDriver::MakeEdgeFromWire(const TopoDS_Shape& aWire,
           Handle(Geom_Curve)::DownCast(CurveSeq(1)->Copy());
 
         aNewCurve->Transform(LocSeq(1).Location().Transformation());
+
+        if (LocSeq(1).Orientation() == TopAbs_REVERSED) {
+          const TopoDS_Vertex aVtxTmp = FirstVertex;
+
+          FirstVertex = LastVertex;
+          LastVertex  = aVtxTmp;
+          FirstVertex.Orientation(TopAbs_FORWARD);
+          LastVertex.Orientation(TopAbs_REVERSED);
+        }
+
         ResEdge = BRepLib_MakeEdge(aNewCurve,
                                    FirstVertex, LastVertex,
                                    FparSeq(1), LparSeq(1));
+
+        if (LocSeq(1).Orientation() == TopAbs_REVERSED) {
+          ResEdge.Reverse();
+        }
       }
     }