From da890f28631d5e0272f68020a5865bad50a97390 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sat, 3 Nov 2018 16:41:04 +0100 Subject: [PATCH] Sketcher: Allow driven constraints when autoredundancy removal and autorecomputes active ========================================================================================== https://forum.freecadweb.org/viewtopic.php?f=3&t=31998#p266626 --- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index b6d26e41b0..eaafe7a053 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -669,6 +669,11 @@ bool SketcherGui::tryAutoRecompute(Sketcher::SketchObject* obj, bool &autoremove bool autoRecompute = hGrp->GetBool("AutoRecompute",false); bool autoRemoveRedundants = hGrp->GetBool("AutoRemoveRedundants",false); + // We need to make sure the solver has right redundancy information before trying to remove the redundants. + // for example if a non-driving constraint has been added. + if(autoRemoveRedundants && autoRecompute) + obj->solve(); + if(autoRemoveRedundants) obj->autoRemoveRedundants();