Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / SketchSolver / SketchSolver_Error.h
index 761696acf3e56aaf2777fc7a00faa9a65bad2160..bac5b642ad56d0ddfac7353cddee6d92ba1fd7bb 100644 (file)
@@ -14,7 +14,8 @@
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 //
 
 #ifndef SketchSolver_Error_H_
@@ -102,6 +103,21 @@ class SketchSolver_Error
     static const std::string MY_ERROR_VALUE("Caution: SolveSpace crash! Constraints are wrong");
     return MY_ERROR_VALUE;
   }
+  /// Constraint has wrong type
+  inline static const std::string& WRONG_CONSTRAINT_TYPE()
+  {
+    static const std::string MY_ERROR_VALUE("Unsupported type of constraint");
+    return MY_ERROR_VALUE;
+  }
+  /// Sketch contains degenerated geometry
+  inline static const std::string& DEGENERATED_GEOMETRY()
+  {
+    static const std::string MY_ERROR_VALUE(
+      "The set of constraints lead to degenerated geometry. "
+      "To fix this, you can either undo your operation or "
+      "remove a constraint or the degenerated geometry.");
+    return MY_ERROR_VALUE;
+  }
 };
 
 #endif