Skip to content

Commit

Permalink
Sketcher: Solver Interface - Treat length equality parameter as a dri…
Browse files Browse the repository at this point in the history
…ven parameter to enable redundant constraint reporting
  • Loading branch information
abdullahtahiriyo committed Nov 27, 2020
1 parent fa92973 commit 056030b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mod/Sketcher/App/Sketch.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 056030b

Please sign in to comment.