]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add call execute() to sketch feature.
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 12:38:06 +0000 (15:38 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 13:42:54 +0000 (16:42 +0300)
src/PythonAPI/model/sketcher/sketch.py

index d4df571cbb2db09bb3f25c9911de5c45981a655c..d9d19e1030056aca2490dbcfa97d8235490ab9d2 100644 (file)
@@ -111,6 +111,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintCoincidence")
         constraint.data().refattr("ConstraintEntityA").setAttr(p1)
         constraint.data().refattr("ConstraintEntityB").setAttr(p2)
+        self._execute()
         return constraint
 
     def setParallel(self, l1, l2):
@@ -119,6 +120,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintParallel")
         constraint.data().refattr("ConstraintEntityA").setObject(l1)
         constraint.data().refattr("ConstraintEntityB").setObject(l2)
+        self._execute()
         return constraint
 
     def setPerpendicular(self, l1, l2):
@@ -127,6 +129,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintPerpendicular")
         constraint.data().refattr("ConstraintEntityA").setObject(l1)
         constraint.data().refattr("ConstraintEntityB").setObject(l2)
+        self._execute()
         return constraint
 
     def setHorizontal(self, line):
@@ -134,6 +137,7 @@ class Sketch(Interface):
         constraint to this Sketch."""
         constraint = self._feature.addFeature("SketchConstraintHorizontal")
         constraint.data().refattr("ConstraintEntityA").setObject(line)
+        self._execute()
         return constraint
 
     def setVertical(self, line):
@@ -141,6 +145,7 @@ class Sketch(Interface):
         constraint to this Sketch."""
         constraint = self._feature.addFeature("SketchConstraintVertical")
         constraint.data().refattr("ConstraintEntityA").setObject(line)
+        self._execute()
         return constraint
 
     def setDistance(self, point, line, length):
@@ -154,7 +159,7 @@ class Sketch(Interface):
         constraint.data().refattr("ConstraintEntityA").setAttr(point)
         constraint.data().refattr("ConstraintEntityB").setObject(line)
         constraint.data().real("ConstraintValue").setValue(length)
-        self._feature.execute()
+        self._execute()
         return constraint
 
     def setLength(self, line, length):
@@ -163,7 +168,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintLength")
         constraint.data().refattr("ConstraintEntityA").setObject(line)
         constraint.data().real("ConstraintValue").setValue(length)
-        self._feature.execute()
+        self._execute()
         return constraint
 
     def setRadius(self, circle, radius):
@@ -172,6 +177,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintRadius")
         constraint.data().refattr("ConstraintEntityA").setObject(circle)
         constraint.data().real("ConstraintValue").setValue(radius)
+        self._execute()
         return constraint
 
     def setEqual(self, object_1, object_2):
@@ -181,7 +187,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintEqual")
         constraint.data().refattr("ConstraintEntityA").setObject(object_1)
         constraint.data().refattr("ConstraintEntityB").setObject(object_2)
-        self._feature.execute()
+        self._execute()
         return constraint
 
     def setAngle(self, line_1, line_2, angle):
@@ -191,7 +197,7 @@ class Sketch(Interface):
         constraint.data().refattr("ConstraintEntityA").setObject(line_1)
         constraint.data().refattr("ConstraintEntityB").setObject(line_2)
         constraint.data().real("ConstraintValue").setValue(angle)
-        self._feature.execute()
+        self._execute()
         return constraint
 
     def setTangent(self, object_1, object_2):
@@ -200,7 +206,7 @@ class Sketch(Interface):
         constraint = self._feature.addFeature("SketchConstraintTangent")
         constraint.data().refattr("ConstraintEntityA").setObject(object_1)
         constraint.data().refattr("ConstraintEntityB").setObject(object_2)
-        self._feature.execute()
+        self._execute()
         return constraint
 
     def setFillet(self, line_1, line_2, radius):
@@ -210,7 +216,7 @@ class Sketch(Interface):
         constraint.data().refattr("ConstraintEntityA").setObject(line_1)
         constraint.data().refattr("ConstraintEntityB").setObject(line_2)
         constraint.data().real("ConstraintValue").setValue(radius)
-        self._feature.execute()
+        self._execute()
         return constraint
 
     #-------------------------------------------------------------