From: azv Date: Tue, 11 Apr 2017 12:14:49 +0000 (+0300) Subject: Issue #2127: arc disappears after move X-Git-Tag: V_2.7.0~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b10121c96c858fda6a7861d0a6764304bb7bc140;p=modules%2Fshaper.git Issue #2127: arc disappears after move Workaround for Debian 8.0: project end point when building an arc --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp index 8cb921538..a1ada3eca 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp @@ -191,7 +191,11 @@ std::shared_ptr GeomAlgoAPI_EdgeBuilder::lineCircleArc( gp_Circ aCircle(gp_Ax2(aCenter, aDir), aRadius); const gp_Pnt& aStart = theStartPoint->impl(); - const gp_Pnt& anEnd = theEndPoint->impl(); + const gp_Pnt& anEndInter = theEndPoint->impl(); + + // project end point to a circle + gp_XYZ aEndDir = anEndInter.XYZ() - aCenter.XYZ(); + gp_Pnt anEnd(aCenter.XYZ() + aEndDir.Normalized() * aRadius); BRepBuilderAPI_MakeEdge anEdgeBuilder; anEdgeBuilder = BRepBuilderAPI_MakeEdge(aCircle, aStart, anEnd);