+ revert to previous values when setDatum fails
+ detect well known invalid values for setDatum + hide some negative distance datums in the gui git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5133 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
@@ -198,6 +198,10 @@ PyObject* SketchObjectPy::setDatum(PyObject *args)
|
||||
str << "Cannot set the datum because the sketch contains conflicting constraints";
|
||||
else if (err == -2)
|
||||
str << "Datum " << Datum << " for the constraint with index " << Index << " is invalid";
|
||||
else if (err == -4)
|
||||
str << "Negative datum values are not valid for the constraint with index " << Index;
|
||||
else if (err == -5)
|
||||
str << "Zero is not a valid datum for the constraint with index " << Index;
|
||||
else
|
||||
str << "Unexpected problem at setting datum " << Datum << " for the constraint with index " << Index;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
|
||||
Reference in New Issue
Block a user