From 7decc3ea55b26f8b082d12f4fbe88652cfdd4b80 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Fri, 16 May 2025 19:12:32 +0200 Subject: [PATCH] Draft: avoid redundant constraints in make_sketch.py (#21398) Forum topic: https://forum.freecad.org/viewtopic.php?t=97072 The MissingVerticalHorizontal functions from the Sketcher WB do not behave as expected. See #21396. A check for redundant contraints is required if `makeMissingVerticalHorizontal()` is used. The argument for the function should be `True`. For consistency the same was done for makeMissingPointOnPointCoincident(). --- src/Mod/Draft/draftmake/make_sketch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/draftmake/make_sketch.py b/src/Mod/Draft/draftmake/make_sketch.py index 27c5f2244b..72789b9093 100644 --- a/src/Mod/Draft/draftmake/make_sketch.py +++ b/src/Mod/Draft/draftmake/make_sketch.py @@ -238,9 +238,9 @@ def make_sketch(objects_list, autoconstraints=False, addTo=None, nobj.addConstraint(constraints) if autoconstraints: nobj.detectMissingPointOnPointConstraints(utils.tolerance()) - nobj.makeMissingPointOnPointCoincident(False) + nobj.makeMissingPointOnPointCoincident(True) nobj.detectMissingVerticalHorizontalConstraints(utils.tolerance()) - nobj.makeMissingVerticalHorizontal(False) + nobj.makeMissingVerticalHorizontal(True) return nobj