diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 23b841c9b5..932baf7431 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -110,6 +110,7 @@ SketchObject::SketchObject() ADD_PROPERTY_TYPE(Geometry, (0) ,"Sketch",(App::PropertyType)(App::Prop_None),"Sketch geometry"); ADD_PROPERTY_TYPE(Constraints, (0) ,"Sketch",(App::PropertyType)(App::Prop_None),"Sketch constraints"); ADD_PROPERTY_TYPE(ExternalGeometry,(0,0),"Sketch",(App::PropertyType)(App::Prop_None),"Sketch external geometry"); + ADD_PROPERTY_TYPE(FullyConstrained, (false),"Sketch",(App::PropertyType)(App::Prop_Output|App::Prop_ReadOnly |App::Prop_Hidden),"Sketch is fully constrained"); Geometry.setOrderRelevant(true); @@ -251,6 +252,7 @@ int SketchObject::solve(bool updateGeoAfterSolving/*=true*/) lastDoF = solvedSketch.setUpSketch(getCompleteGeometry(), Constraints.getValues(), getExternalGeometryCount()); + FullyConstrained.setValue(lastDoF == 0); // At this point we have the solver information about conflicting/redundant/over-constrained, but the sketch is NOT solved. // Some examples: // Redundant: a vertical line, a horizontal line and an angle constraint of 90 degrees between the two lines diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index 28356326df..9bf3aecd36 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -67,6 +67,7 @@ public: Part ::PropertyGeometryList Geometry; Sketcher::PropertyConstraintList Constraints; App ::PropertyLinkSubList ExternalGeometry; + App ::PropertyBool FullyConstrained; /** @name methods override Feature */ //@{ short mustExecute() const override;