Salome HOME
Receive DoF from the solver. Update test cases to check DoF.
[modules/shaper.git] / src / PythonAPI / model / sketcher / tools.py
index fc0e39a2572e290f8fb425803b9a71c4e86a3917..31efc0f2837f28290a468aea7c0d2e3643b833ae 100644 (file)
@@ -39,4 +39,9 @@ def addPolygon(sketch, *coords):
         ln.endPoint(), pg[0].startPoint()
         )
     pg.append(ln)
-    return pg
\ No newline at end of file
+    return pg
+
+def dof(sketch):
+    """ Extract degrees of freedom for the given sketch
+    """
+    return int(filter(str.isdigit, sketch.string("SolverDOF").value()))
\ No newline at end of file