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
This commit is contained in:
vsr 2015-04-28 14:11:21 +03:00
parent 8febd640e2
commit 3e008980d4

View File

@ -95,7 +95,8 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const
gp_Ax2 anAxes (aP, aV); gp_Ax2 anAxes (aP, aV);
gp_Ax3 anAxes3(anAxes); gp_Ax3 anAxes3(anAxes);
gp_Pln aPln(anAxes3); 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(); TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge();
BRepBuilderAPI_MakeWire MW; BRepBuilderAPI_MakeWire MW;
MW.Add(TopoDS::Edge(aCircle)); 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"); Standard_ConstructionError::Raise("Disk creation aborted: coincident points given");
if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular())) if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
Standard_ConstructionError::Raise("Disk creation aborted: points lay on one line"); 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_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); gp_Pln aPln(anAxes3);
TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge();
BRepBuilderAPI_MakeWire MW; BRepBuilderAPI_MakeWire MW;
@ -146,9 +148,10 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const
aV = gp::DY(); aV = gp::DY();
gp_Ax2 anAxes (aP, aV); gp_Ax2 anAxes (aP, aV);
gp_Ax2 anAxes1(aP, -aV);
gp_Ax3 anAxes3(anAxes); gp_Ax3 anAxes3(anAxes);
gp_Pln aPln(anAxes3); gp_Pln aPln(anAxes3);
gp_Circ aCirc (anAxes, aCI.GetRadius()); gp_Circ aCirc (anAxes1, aCI.GetRadius());
TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge();
BRepBuilderAPI_MakeWire MW; BRepBuilderAPI_MakeWire MW;
MW.Add(TopoDS::Edge(aCircle)); MW.Add(TopoDS::Edge(aCircle));