From b10121c96c858fda6a7861d0a6764304bb7bc140 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 11 Apr 2017 15:14:49 +0300 Subject: [PATCH] Issue #2127: arc disappears after move Workaround for Debian 8.0: project end point when building an arc --- src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.2