Salome HOME
Correct order of sub-shapes in the intersection and neighbor names, as it is in the...
[modules/shaper.git] / src / FeaturesPlugin / Test / Test2172.py
index 65c4daca79a78c2cd49178ab0a3a7209ab5545c4..8d9af6b571695ddc891e2c7d4b3e100f46791985 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from salome.shaper import model
 
 model.begin()
@@ -36,7 +38,7 @@ SketchLine_5 = Sketch_1.addLine(551.916977573864, -398.3514326277755, -18.083022
 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
 SketchLine_6 = Sketch_1.addLine(-18.08302242613596, -398.3514326277755, -18.08302242613596, -98.35143262777552)
 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
-SketchArc_1 = Sketch_1.addArc(0, -7.626897158721915e-023, -85.62958302127123, 51.64856737222455, -18.08302242613596, -98.35143262777552, False)
+SketchArc_1 = Sketch_1.addArc(0, -7.626897158721915e-23, -85.62958302127123, 51.64856737222455, -18.08302242613596, -98.35143262777552, False)
 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchArc_1.endPoint())
 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchArc_1.startPoint())
 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_2.result())
@@ -50,8 +52,8 @@ SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_5.result(), 570)
 SketchConstraintAngle_1 = Sketch_1.setAngleBackward(SketchLine_5.result(), SketchLine_4.result(), 139.9999999999999)
 SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_2.result(), 124.9999999999987)
 SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_6.result(), 300)
-SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.startPoint(), SketchLine_2.result(), 350)
-SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_4.startPoint(), SketchLine_5.result(), 300)
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.startPoint(), SketchLine_2.result(), 350, False)
+SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_4.startPoint(), SketchLine_5.result(), 300, False)
 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_1.center(), SketchPoint_1.coordinates())
 SketchCircle_1 = Sketch_1.addCircle(623.3624504738834, 247.4315530304268, 75)
@@ -68,13 +70,15 @@ SketchPoint_2 = Sketch_1.addPoint(557.3438493481349, 211.8430112592427)
 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_8.startPoint())
 SketchConstraintCollinear_1 = Sketch_1.setCollinear(SketchLine_7.result(), SketchLine_8.result())
 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchCircle_2.results()[1])
-SketchConstraintDistance_3 = Sketch_1.setDistance(SketchCircle_2.center(), SketchLine_6.endPoint(), 325)
+SketchConstraintDistance_3 = Sketch_1.setDistance(SketchCircle_2.center(), SketchLine_6.endPoint(), 325, False)
 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.results()[1])
-SketchConstraintDistance_4 = Sketch_1.setDistance(SketchCircle_1.center(), SketchLine_2.endPoint(), 325)
+SketchConstraintDistance_4 = Sketch_1.setDistance(SketchCircle_1.center(), SketchLine_2.endPoint(), 325, False)
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchLine_8f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f-SketchLine_7r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_2_1/Base_Edge_2"), model.selection("EDGE", "Revolution_2_1/Base_Edge_3"), model.selection("EDGE", "Revolution_2_1/Base_Edge_1")])
+Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f-SketchCircle_2_2f-SketchLine_7r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
+Group_1_objects = [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_8][weak_name_2]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_8][weak_name_1]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][weak_name_3]"), model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_8][weak_name_3]"), model.selection("EDGE", "[Revolution_2_1/Generated_Face&Sketch_1/SketchCircle_2_2&weak_name_1][weak_name_3]"), model.selection("EDGE", "[Revolution_2_1/Generated_Face&Sketch_1/SketchCircle_2_2&weak_name_1][Revolution_2_1/Generated_Face&Sketch_1/SketchLine_7]"), model.selection("EDGE", "[Revolution_2_1/Generated_Face&Sketch_1/SketchCircle_2_2&weak_name_1][Revolution_2_1/Generated_Face&Sketch_1/SketchCircle_2_2&weak_name_2]"), model.selection("EDGE", "[Revolution_2_1/Generated_Face&Sketch_1/SketchCircle_2_2&weak_name_2][weak_name_3]"), model.selection("EDGE", "[Revolution_2_1/Generated_Face&Sketch_1/SketchLine_7][weak_name_3]"), model.selection("EDGE", "[Revolution_2_1/Generated_Face&Sketch_1/SketchCircle_2_2&weak_name_2][Revolution_2_1/Generated_Face&Sketch_1/SketchLine_7]")]
+Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
+model.do()
 model.end()
 
 # check that resulting group selection is valid