Sketcher: SketchObject partially redundant status

This commit is contained in:
Abdullah Tahiri
2021-01-19 11:26:13 +01:00
committed by abdullahtahiriyo
parent a3c1010800
commit b01313c0d8
2 changed files with 13 additions and 1 deletions

View File

@@ -245,9 +245,11 @@ void SketchObject::retrieveSolverDiagnostics()
{
lastHasConflict = solvedSketch.hasConflicts();
lastHasRedundancies = solvedSketch.hasRedundancies();
lastHasPartialRedundancies = solvedSketch.hasPartialRedundancies();
lastHasMalformedConstraints = solvedSketch.hasMalformedConstraints();
lastConflicting=solvedSketch.getConflicting();
lastRedundant=solvedSketch.getRedundant();
lastPartiallyRedundant=solvedSketch.getPartiallyRedundant();
lastMalformedConstraints=solvedSketch.getMalformedConstraints();
}
@@ -314,6 +316,10 @@ int SketchObject::solve(bool updateGeoAfterSolving/*=true*/)
Base::Console().Error("Sketch %s has malformed constraints!\n",this->getNameInDocument());
}
if(lastHasPartialRedundancies) {
Base::Console().Warning("Sketch %s has partially redundant constraints!\n",this->getNameInDocument());
}
lastSolveTime=solvedSketch.getSolveTime();
if (err == 0 && updateGeoAfterSolving) {
@@ -656,7 +662,7 @@ int SketchObject::setUpSketch()
retrieveSolverDiagnostics();
if(lastHasRedundancies || lastDoF < 0 || lastHasConflict || lastHasMalformedConstraints)
if(lastHasRedundancies || lastDoF < 0 || lastHasConflict || lastHasMalformedConstraints || lastHasPartialRedundancies)
Constraints.touch();
return lastDoF;