Salome HOME
Fix for the #1757 with full split of the selected sketch-face.
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintDistanceBehavior.py
index 35ab1496c62a7d35459e590568951f54a7431421..269d4acfa7264d601f63941a182b894a80265c3c 100644 (file)
@@ -40,11 +40,14 @@ model.do()
 # Test 1.
 # =============================================================================
 # horizontal distance constraint
-SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(firstPoint, secondPoint, "distance")
+SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(firstPoint, secondPoint, 10)
+SketchConstraintDistanceHorizontal_1.feature().real("ConstraintValue").setText(DistanceParam.name().value())
 model.do()
 
 # changing the parameter
 for param in range(-30, 31, 2):
+    if param == 0:
+        continue
     DistanceParam.setValue(param)
     model.do()
     dist = secondPoint.x() - firstPoint.x()
@@ -61,11 +64,14 @@ model.do()
 # Test 2.
 # =============================================================================
 # Vertical distance constraint
-SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(firstPoint, secondPoint, "distance")
+SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(firstPoint, secondPoint, 10)
+SketchConstraintDistanceVertical_1.feature().real("ConstraintValue").setText(DistanceParam.name().value())
 model.do()
 
 # changing the parameter
 for param in range(-30, 31, 2):
+    if param == 0:
+        continue
     DistanceParam.setValue(param)
     model.do()
     dist = secondPoint.y() - firstPoint.y()