From 056030b1d2c54e0d024c437c98200cf763edbf88 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Fri, 27 Nov 2020 14:31:00 +0100 Subject: [PATCH] Sketcher: Solver Interface - Treat length equality parameter as a driven parameter to enable redundant constraint reporting --- src/Mod/Sketcher/App/Sketch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index f36f1e4d25a3..76bc5f57c4cc 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -2256,7 +2256,9 @@ int Sketch::addEqualConstraint(int geoId1, int geoId2) double dy2 = (*l2.p2.y - *l2.p1.y); double value = (sqrt(dx1*dx1+dy1*dy1)+sqrt(dx2*dx2+dy2*dy2))/2; // add the parameter for the common length (this is added to Parameters, not FixParameters) - Parameters.push_back(new double(value)); + double *drivenvalue = new double(value); + Parameters.push_back(drivenvalue); + DrivenParameters.push_back(drivenvalue); double *length = Parameters[Parameters.size()-1]; int tag = ++ConstraintsCounter; GCSsys.addConstraintEqualLength(l1, l2, length, tag);