diff --git a/src/Mod/TechDraw/App/Geometry.cpp b/src/Mod/TechDraw/App/Geometry.cpp index 1c0c5767c1..a12e61ab80 100644 --- a/src/Mod/TechDraw/App/Geometry.cpp +++ b/src/Mod/TechDraw/App/Geometry.cpp @@ -1529,13 +1529,14 @@ bool GeometryUtils::getCircleParms(const TopoDS_Edge& occEdge, double& radius, B pointsOnCurve.push_back(Base::convertTo(newpoint)); } - auto edgeLong = edgeLength(occEdge); - constexpr double LimitFactor{0.001}; // 0.1% not sure about this value - double tolerance = edgeLong * LimitFactor; + double tolerance = EWTOLERANCE; // not as demanding as Precision::Confusion() but more + // demanding than using the edge length - isArc = true; - if (firstPoint.IsEqual(lastPoint, tolerance)) { - isArc = false; + isArc = false; + if (!firstPoint.IsEqual(lastPoint, tolerance)) { + // we were dropping information by not including lastPoint + pointsOnCurve.push_back(lastPoint); + isArc = true; } int passCount{0}; @@ -1576,6 +1577,7 @@ bool GeometryUtils::getCircleParms(const TopoDS_Edge& occEdge, double& radius, B return true; } catch (Standard_Failure&) { + // we think this is a circle, but occt disagrees Base::Console().message("Geo::getCircleParms - failed to make a circle\n"); }