X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Error.h;h=148e5de066b9625db41f295f13442f3368dc54d6;hb=b9e0bc62b8d67c3f82e4feb583e4e3b9f7249202;hp=dfae098bf8b1f14bda7fe20eac86ab4e8094deb3;hpb=9ea97108f0859c83264c469256f065e7e5b36512;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Error.h b/src/SketchSolver/SketchSolver_Error.h index dfae098bf..148e5de06 100644 --- a/src/SketchSolver/SketchSolver_Error.h +++ b/src/SketchSolver/SketchSolver_Error.h @@ -20,7 +20,15 @@ class SketchSolver_Error /// The value parameter for the constraint inline static const std::string& CONSTRAINTS() { - static const std::string MY_ERROR_VALUE("Conflicting constraints"); + static const std::string MY_ERROR_VALUE("The constraint is conflicting with others. \ + To fix this, you can either undo your operation or remove a conflicting constraint."); + return MY_ERROR_VALUE; + } + /// Constraints should use objects instead of features as attributes + inline static const std::string& NEED_OBJECT_NOT_FEATURE() + { + static const std::string + MY_ERROR_VALUE("Constraint should be based on object instead of feature"); return MY_ERROR_VALUE; } /// The entities need to have shared point, but they have not @@ -41,6 +49,38 @@ class SketchSolver_Error static const std::string MY_ERROR_VALUE("Incorrect attribute"); return MY_ERROR_VALUE; } + /// Tangency constraint has wrong attributes + inline static const std::string& INCORRECT_TANGENCY_ATTRIBUTE() + { + static const std::string MY_ERROR_VALUE("An arc should be an attribute of tangency constraint"); + return MY_ERROR_VALUE; + } + /// Mirror constraint has wrong attributes + inline static const std::string& INCORRECT_MIRROR_ATTRIBUTE() + { + static const std::string MY_ERROR_VALUE("Mirror constraint has wrong attributes"); + return MY_ERROR_VALUE; + } + /// Entity is already fixed + inline static const std::string& ALREADY_FIXED() + { + static const std::string MY_ERROR_VALUE("Entity already fixed"); + return MY_ERROR_VALUE; + } + /// Tangency constraint has been built with wrong attributes + /// (for example, line and arc have two coincident points) + inline static const std::string& TANGENCY_FAILED() + { + static const std::string + MY_ERROR_VALUE("Unable to create tangency constraint on given attributes"); + return MY_ERROR_VALUE; + } + /// Crash in SolveSpace + inline static const std::string& SOLVESPACE_CRASH() + { + static const std::string MY_ERROR_VALUE("Caution: SolveSpace crash! Constraints are wrong"); + return MY_ERROR_VALUE; + } }; #endif