From 3e008980d404aacbbfda91fdcfd289f6dac267f4 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 28 Apr 2015 14:11:21 +0300 Subject: [PATCH] 0023057: [EDF GEOM] Direction of edge of a circle has changed on Salome V7_6_BR 0023058: [CEA 1493] Regression : MakeDiskPntVecR does not create the same disk as before --- src/GEOMImpl/GEOMImpl_DiskDriver.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_DiskDriver.cxx b/src/GEOMImpl/GEOMImpl_DiskDriver.cxx index 76a6b30dc..460f1050d 100644 --- a/src/GEOMImpl/GEOMImpl_DiskDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_DiskDriver.cxx @@ -95,7 +95,8 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const gp_Ax2 anAxes (aP, aV); gp_Ax3 anAxes3(anAxes); gp_Pln aPln(anAxes3); - gp_Circ aCirc (anAxes, aCI.GetRadius()); + gp_Ax2 anAxes1(aP, -aV); + gp_Circ aCirc (anAxes1, aCI.GetRadius()); TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); BRepBuilderAPI_MakeWire MW; MW.Add(TopoDS::Edge(aCircle)); @@ -123,9 +124,10 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const Standard_ConstructionError::Raise("Disk creation aborted: coincident points given"); if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular())) Standard_ConstructionError::Raise("Disk creation aborted: points lay on one line"); - Handle(Geom_Circle) aCirc = GC_MakeCircle(aP1, aP2, aP3).Value(); + Handle(Geom_Circle) aCirc = GC_MakeCircle(aP3, aP2, aP1).Value(); gp_Circ aGpCirc = aCirc->Circ(); - gp_Ax3 anAxes3(aGpCirc.Position()); + gp_Ax2 anAxes = aGpCirc.Position(); + gp_Ax3 anAxes3(anAxes.Location(), -anAxes.Direction()); gp_Pln aPln(anAxes3); TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); BRepBuilderAPI_MakeWire MW; @@ -146,9 +148,10 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const aV = gp::DY(); gp_Ax2 anAxes (aP, aV); + gp_Ax2 anAxes1(aP, -aV); gp_Ax3 anAxes3(anAxes); gp_Pln aPln(anAxes3); - gp_Circ aCirc (anAxes, aCI.GetRadius()); + gp_Circ aCirc (anAxes1, aCI.GetRadius()); TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); BRepBuilderAPI_MakeWire MW; MW.Add(TopoDS::Edge(aCircle)); -- 2.39.2