From caefa0cf8ea83edea12ef4f6e326cea0bfb371ba Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 29 Jan 2018 11:49:42 +0800 Subject: [PATCH] libarea: fix arc fitting bug Bug introduced in fbacb9fbc8eb30a0efc51235b014be3c4cb34445 --- src/Mod/Path/libarea/Curve.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/libarea/Curve.cpp b/src/Mod/Path/libarea/Curve.cpp index e758a423a9..baa1b02744 100644 --- a/src/Mod/Path/libarea/Curve.cpp +++ b/src/Mod/Path/libarea/Curve.cpp @@ -246,8 +246,12 @@ void CCurve::FitArcs(bool retry) if(arc_found) { // this means the last edge has already been fitted with // some arc, so we move the first edge to the end - m_vertices.push_back(m_vertices.front()); + + // Must pop first, because this is a closed curve, + // meaning the last point must be equal to the first + // point. m_vertices.pop_front(); + m_vertices.push_back(m_vertices.front()); }else{ m_vertices.push_front(CVertex(new_vertices.back().m_p)); m_vertices.pop_back();