From: vsr Date: Tue, 28 Apr 2015 11:11:21 +0000 (+0300) Subject: 0023057: [EDF GEOM] Direction of edge of a circle has changed on Salome V7_6_BR X-Git-Tag: V7_6_0rc1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3e008980d404aacbbfda91fdcfd289f6dac267f4;p=modules%2Fgeom.git 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 --- 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));