Sketcher: Augment malformed constraint messages

===============================================

Enable a user recomputing an object/document to identify which sketch has the malformed constraints.
This commit is contained in:
Abdullah Tahiri
2020-07-02 17:46:16 +02:00
parent 1fa1d753b0
commit 4ed35140c0
3 changed files with 83 additions and 71 deletions

View File

@@ -69,6 +69,7 @@ Sketch::Sketch()
, RecalculateInitialSolutionWhileMovingPoint(false)
, GCSsys(), ConstraintsCounter(0)
, isInitMove(false), isFine(true), moveStep(0)
, malformedConstraints(false)
, defaultSolver(GCS::DogLeg)
, defaultSolverRedundant(GCS::DogLeg)
, debugMode(GCS::Minimal)
@@ -116,6 +117,7 @@ void Sketch::clear(void)
isInitMove = false;
ConstraintsCounter = 0;
Conflicting.clear();
malformedConstraints = false;
}
int Sketch::setUpSketch(const std::vector<Part::Geometry *> &GeoList,
@@ -1493,6 +1495,7 @@ int Sketch::addConstraints(const std::vector<Constraint *> &ConstraintList)
if(rtn == -1) {
Base::Console().Error("Sketcher constraint number %d is malformed!\n",cid);
malformedConstraints = true;
}
}
@@ -1511,6 +1514,7 @@ int Sketch::addConstraints(const std::vector<Constraint *> &ConstraintList,
if(rtn == -1) {
Base::Console().Error("Sketcher constraint number %d is malformed!\n",cid);
malformedConstraints = true;
}
}
else {