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().
This commit is contained in:
Roy-043
2025-05-16 19:12:32 +02:00
committed by GitHub
parent fc4203fbf8
commit 9d79d1aab9

View File

@@ -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