From d0c7ab7d624b0d5aa32ff2e2f1d218b71d3e4ffe Mon Sep 17 00:00:00 2001 From: Leandro Heck <1277920+leoheck@users.noreply.github.com> Date: Wed, 7 Jan 2026 05:23:28 -0300 Subject: [PATCH] Sketcher: Support Bezier and Offset curves as external geometry (#25144) * Sketcher: Support Bezier and Offset curves as external geometry * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Sketcher: Fix adding projection of external arc of circle In processEdge() it's checked if first and last point of the projected arc of circle are almost equal. If yes then a full circle is assumed but this conclusion is not necessarily correct because it's still possible that the external arc of circle is very short. The better criterion is to check the parameter range of the arc of circle. See also: https://github.com/FreeCAD/FreeCAD/pull/25144#issuecomment-3502916685 --------- Co-authored-by: wwmayer Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/Mod/Sketcher/App/PreCompiled.h | 1 + src/Mod/Sketcher/App/SketchObject.cpp | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/PreCompiled.h b/src/Mod/Sketcher/App/PreCompiled.h index 5fd9bbf02c..ab665d0f6e 100644 --- a/src/Mod/Sketcher/App/PreCompiled.h +++ b/src/Mod/Sketcher/App/PreCompiled.h @@ -75,6 +75,7 @@ # include # include # include +# include # include # include # include diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 811d09d833..904d88152f 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -8420,6 +8421,18 @@ void processEdge2(TopoDS_Edge& projEdge, std::vectorsetHandle(projCurve);