]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fixed ModelAPI tests.
authordbv <dbv@opencascade.com>
Wed, 31 Oct 2018 16:01:45 +0000 (19:01 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
36 files changed:
src/ModelAPI/Test/Test1064.py
src/ModelAPI/Test/Test1512.py
src/ModelAPI/Test/Test1757.py
src/ModelAPI/Test/Test1995.py
src/ModelAPI/Test/Test1998.py
src/ModelAPI/Test/Test2170.py
src/ModelAPI/Test/Test2228.py
src/ModelAPI/Test/Test2241.py
src/ModelAPI/Test/Test2252.py
src/ModelAPI/Test/Test2276.py
src/ModelAPI/Test/Test2358_1.py
src/ModelAPI/Test/Test2358_2.py
src/ModelAPI/Test/Test2389.py
src/ModelAPI/Test/Test2391.py
src/ModelAPI/Test/Test2396.py
src/ModelAPI/Test/Test2401.py
src/ModelAPI/Test/Test2413.py
src/ModelAPI/Test/Test2496.py
src/ModelAPI/Test/Test2510.py
src/ModelAPI/Test/TestCustomName_BooleanCut.py
src/ModelAPI/Test/TestCustomName_CommonCompSolid.py
src/ModelAPI/Test/TestCustomName_CutCompSolid.py
src/ModelAPI/Test/TestCustomName_CutGroup.py
src/ModelAPI/Test/TestCustomName_ExtrudeFace.py
src/ModelAPI/Test/TestCustomName_ExtrusionCut.py
src/ModelAPI/Test/TestCustomName_ExtrusionCutFace.py
src/ModelAPI/Test/TestCustomName_MultiTranslation.py
src/ModelAPI/Test/TestCustomName_Placement.py
src/ModelAPI/Test/TestCustomName_RotateGroup.py
src/ModelAPI/Test/TestCustomName_Translation.py
src/ModelAPI/Test/TestFeatureSelection_2.py
src/ModelAPI/Test/TestFolder_CustomName.py
src/ModelAPI/Test/TestSelectionScope.py
src/ModelAPI/Test/TestWeakNaming2125.py
src/ModelAPI/Test/TestWeakNaming2222.py
src/ModelAPI/Test/TestWeakNaming2375.py

index bd2599e08c9ca09a496b8c57848ff9458289c8a2..cae7ccd6bfcff8c4e175eccc734eaabefb697fc8 100644 (file)
@@ -93,7 +93,7 @@ aSession.setActiveDocument(aPartSet)
 aPlane = aPartSet.addFeature("Plane")
 aPlane.string("creation_method").setValue("by_other_plane")
 aPlane.string("by_other_plane_option").setValue("by_distance_from_other")
-aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_2")
+aPlane.selection("plane").selectSubShape("face", "Part_1/_weak_name_5_Extrusion_1_1")
 aPlane.real("distance").setValue(0.001)
 aPlane.boolean("reverse").setValue(False)
 aSession.finishOperation()
index 5a8182c2c1bb7bd83715b368a5cb2bcdb02337ed..8494772c8061d27c759f557269492c13c56a8880 100755 (executable)
@@ -155,13 +155,13 @@ def check_owner(selection, topology_type, feature):
   aSession.abortOperation()
 
 # check faces
-check_owner("Extrusion_1_1/Generated_Face_1", "face", aBox)
-check_owner("Fuse_1_1/Modified_Face_2", "face", aBox)
-check_owner("Cut_1_1/Modified_Face_1", "face", aHoleExt)
-check_owner("Fuse_1_1/Modified_Face_1", "face", aTower)
+check_owner("Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4", "face", aBox)
+check_owner("Fuse_1_1/Modified_Face&Extrusion_1_1/To_Face", "face", aBox)
+check_owner("Cut_1_1/Modified_Face&Sketch_2/SketchCircle_1_2", "face", aHoleExt)
+check_owner("Fuse_1_1/Modified_Face&Sketch_3/SketchCircle_2_2", "face", aTower)
 # check edges without ambiguity
-check_owner("Fuse_1_1/Modified_Face_2&Extrusion_1_1/Generated_Face_2", "edge", aBox)
-check_owner("Fuse_1_1/Modified_Face_1&Extrusion_3_1/To_Face_1", "edge", aTower)
+check_owner("[Fuse_1_1/Modified_Face&Extrusion_1_1/To_Face][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3]", "edge", aBox)
+check_owner("[Fuse_1_1/Modified_Face&Sketch_3/SketchCircle_2_2][Extrusion_3_1/To_Face]", "edge", aTower)
 
 # check the connected topology method: solid is not a compound of connected topology
 assert(aFuse.firstResult().shape().isConnectedTopology() == False)
index 8418bdc89bf762d073b2768ab3ce4e1982cfb223..31152fb18b2157808f06021dfbd998da89159409 100644 (file)
@@ -54,13 +54,13 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 300, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 300, 0)
 
 #=========================================================================
 # Cut another rectangle to make a groove
 #=========================================================================
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/To_Face_1"), 0, [model.selection("SOLID", "Extrusion_1_1")])
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/From_Face_1"))
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/To_Face"), 0, [model.selection("SOLID", "Extrusion_1_1")])
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/From_Face"))
 SketchLine_5 = Sketch_2.addLine(-47.794137712106, -188.943752610533, 90.842718875892, -188.943752610533)
 SketchLine_6 = Sketch_2.addLine(90.842718875892, -188.943752610533, 90.842718875892, -51.567231082425)
 SketchLine_7 = Sketch_2.addLine(90.842718875892, -51.567231082425, -47.794137712106, -51.567231082425)
@@ -79,8 +79,8 @@ model.do()
 #=========================================================================
 # Make a cylindrical hole using one of the produced faces
 #=========================================================================
-ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_2"), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"))
+ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3"), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1&weak_name_2"))
 SketchCircle_1 = Sketch_3.addCircle(143.412751420315, -228.52745656314, 32.158435160764)
 ExtrusionCut_2.setNestedSketch(Sketch_3)
 
@@ -92,8 +92,8 @@ Part_1.document().setCurrentFeature(ExtrusionCut_1.feature(), True)
 #=========================================================================
 # Modify the cylindrical hole base face by another groove in the history before the hole is created
 #=========================================================================
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), -50, [model.selection("SOLID", "ExtrusionCut_1_1")])
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4"), -50, [model.selection("SOLID", "ExtrusionCut_1_1")])
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2"))
 SketchLine_9 = Sketch_4.addLine(-176.701443076057, -151.212050129331, -91.83965287802501, -151.212050129331)
 SketchLine_10 = Sketch_4.addLine(-91.83965287802501, -151.212050129331, -91.83965287802501, -84.473709256573)
 SketchLine_11 = Sketch_4.addLine(-91.83965287802501, -84.473709256573, -176.701443076057, -84.473709256573)
@@ -125,6 +125,6 @@ import ModelAPI
 
 assert(ModelAPI.ModelAPI_Session.get().validators().validate(Sketch_4.feature()))
 assert(ModelAPI.ModelAPI_Session.get().validators().validate(ExtrusionCut_2.feature()))
-assert(Sketch_3.feature().selection("External").namingName() == "ExtrusionCut_3_1/Modfied_5")
+assert(Sketch_3.feature().selection("External").namingName() == "ExtrusionCut_3_1/Modified_Face&Sketch_1/SketchLine_1&weak_name_3")
 
 assert(model.checkPythonDump())
index 123cab3cb370fffb75893422f0db433ba33a7ee2..cb931c2d55be7b8d0994262cd10a8a2b17d8ddeb 100644 (file)
@@ -42,9 +42,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 model.do()
-Axis_4 = model.addAxis(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f"), model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_3s-SketchLine_2e"))
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 50, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_2"))
+Axis_4 = model.addAxis(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f"), model.selection("VERTEX", "Sketch_1/SketchLine_2_EndVertex"))
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 50, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3"))
 SketchCircle_1 = Sketch_2.addCircle(12.88847795756506, 28.93359954982685, 11.55225986344597)
 model.do()
 
index 743598addfd710c08254055a1db31e7e09850198..ac0ff8c4b83df90427fef6cbd0d21513dba786fd 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()
@@ -27,8 +29,9 @@ Part_1_doc = Part_1.document()
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
 SketchLine_1 = Sketch_1.addLine(-106.3464837049742, -78.0445969125214, -108.0617495711835, 165.5231560891939)
 model.do()
-Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1")])
-Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1e"), model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s")])
+Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchLine_1")])
+Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_1/SketchLine_1_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex")])
+model.do()
 model.end()
 
 assert(model.checkPythonDump())
index daf3d34731eeb2e6ef43b24a0d864e34d9bc0b09..f0133e287e791fd8212afcd16bf637846a5770f3 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()
@@ -47,7 +49,7 @@ SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_2.startPoint()
 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_6")
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_3.result(), 200)
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_1.result(), 200)
-SketchArc_2 = Sketch_1.addArc(250, 0, 1.232595164407831e-032, 0, 500, 0, False)
+SketchArc_2 = Sketch_1.addArc(250, 0, 1.232595164407831e-32, 0, 500, 0, False)
 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_2.center())
 SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_7")
 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchArc_2.startPoint())
@@ -63,10 +65,11 @@ SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_12")
 model.do()
 Sketch_1.setName("toto")
 Sketch_1.result().setName("tutu")
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "tutu/Face-SketchLine_1f-SketchLine_3f-SketchArc_1_2f-SketchArc_2_2f")], model.selection(), 10, 0)
-Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "tutu/Edge-SketchLine_2")])
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "tutu/Face-SketchLine_1r-SketchArc_2_2f-SketchLine_3f-SketchArc_1_2f")], model.selection(), 10, 0)
+Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "tutu/SketchLine_2")])
 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "PartSet/OZ"), 100, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Extrusion_2_1/Generated_Edge_2&Extrusion_2_1/To_Edge_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Edge_1&Extrusion_2_1/To_Edge_1")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "[Extrusion_2_1/Generated_Edge&tutu/SketchLine_2_StartVertex]e[Extrusion_2_1/To_Edge]e"), model.selection("VERTEX", "[Extrusion_2_1/Generated_Edge&tutu/SketchLine_2_EndVertex]e[Extrusion_2_1/To_Edge]e")])
+model.do()
 model.end()
 
 # check that resulting group selection is valid
index 1da5212a856bc0705b6a8e4ef5712b7b4dd900ae..3540fa05502af7e8da49c302c2ec82770c6d599a 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()
@@ -31,16 +33,16 @@ SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_1.coordinates
 model.do()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1/Face-SketchCircle_1_2r-SketchCircle_2_2f")], model.selection(), 5, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/YOZ"))
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1/Face-SketchCircle_2_2f-SketchCircle_1_2r")], model.selection(), 5, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("YOZ"))
 SketchCircle_3 = Sketch_2.addCircle(-0.01730125245914903, 1.175069067120482, 0.2787321880802174)
 SketchCircle_4 = Sketch_2.addCircle(-0.01730125245914903, 1.175069067120482, 0.3197841740766353)
 SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchCircle_3.center(), SketchCircle_4.center())
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r-SketchCircle_2_2f")], model.selection(), 0, 3)
-Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face_1"), 0, model.selection(), 0)
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_2_1")], [model.selection("SOLID", "Extrusion_3_1")])
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOZ"))
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f-SketchCircle_1_2r")], model.selection(), 0, 3)
+Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face"), 0, model.selection(), 0)
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_2_1")], [model.selection("SOLID", "Extrusion_3_1")])
+Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
 SketchLine_1 = Sketch_3.addLine(-3.362323990279312, -0.5188129046480872, 0.8318943090987101, -0.5188129046480872)
 SketchLine_2 = Sketch_3.addLine(0.8318943090987101, -0.5188129046480872, 0.8318943090987101, 7.155729512171993)
 SketchLine_3 = Sketch_3.addLine(0.8318943090987101, 7.155729512171993, -3.362323990279312, 7.155729512171993)
@@ -54,15 +56,16 @@ SketchConstraintVertical_1 = Sketch_3.setVertical(SketchLine_2.result())
 SketchConstraintHorizontal_2 = Sketch_3.setHorizontal(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_3.setVertical(SketchLine_4.result())
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_4"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_1")])
-Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchCircle_2_2f")], model.selection(), model.selection("FACE", "Extrusion_2_1/From_Face_1"), 0, model.selection(), 0)
-Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_4_1")])
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Cut_1_1"), model.selection("SOLID", "Cut_2_1"), model.selection("FACE", "Face_1_1")])
-Remove_SubShapes_1_objects = [model.selection("SOLID", "Partition_1_1_1_1"), model.selection("SOLID", "Partition_1_1_1_2"), model.selection("SOLID", "Partition_1_1_1_3"), model.selection("SOLID", "Partition_1_1_1_4")]
+Face_1_objects = [model.selection("EDGE", "Sketch_2/SketchLine_2"), model.selection("EDGE", "Sketch_2/SketchLine_3"), model.selection("EDGE", "Sketch_2/SketchLine_4"), model.selection("EDGE", "Sketch_2/SketchLine_1")]
+Face_1 = model.addFace(Part_1_doc, Face_1_objects)
+Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchCircle_2_2f-SketchCircle_1_2r_wire")], model.selection(), model.selection("FACE", "Extrusion_2_1/From_Face"), 0, model.selection(), 0)
+Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_4_1")])
+Partition_1_objects = [model.selection("SOLID", "Cut_1_1"), model.selection("SOLID", "Cut_2_1"), model.selection("FACE", "Face_1_1")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
+Remove_SubShapes_1_objects_1 = [model.selection("SOLID", "Partition_1_1_1_1"), model.selection("SOLID", "Partition_1_1_1_2"), model.selection("SOLID", "Partition_1_1_1_3"), model.selection("SOLID", "Partition_1_1_1_4")]
 Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Partition_1_1"))
-Remove_SubShapes_1.setSubShapesToKeep(Remove_SubShapes_1_objects)
-
-
+Remove_SubShapes_1.setSubShapesToKeep(Remove_SubShapes_1_objects_1)
+model.do()
 model.end()
 
 # check that remove sub-shapes contains correct selection
index 10747cdea20fb9b0bfee451497b2337a12845cde..d03f1dbd8b8fc131ec161566538e7245aee4320a 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()
@@ -52,20 +54,20 @@ SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_6.result())
 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
-SketchArc_1 = Sketch_1.addArc(4.151438510550382e-034, -3.089278765476956e-034, 81.26217508737108, 0, 0, 81.26217508737108, False)
+SketchArc_1 = Sketch_1.addArc(4.151438510550382e-34, -3.089278765476956e-34, 81.26217508737108, 0, 0, 81.26217508737108, False)
 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchArc_1.center())
 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchArc_1.startPoint())
 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_2.result(), SketchArc_1.endPoint())
 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchArc_1.endPoint())
 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_7.result())
-SketchArc_2 = Sketch_1.addArc(4.151438510550382e-034, -3.089278765476956e-034, 76.26217508737108, 0, 0, 76.26217508737108, False)
+SketchArc_2 = Sketch_1.addArc(4.151438510550382e-34, -3.089278765476956e-34, 76.26217508737108, 0, 0, 76.26217508737108, False)
 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchArc_2.center())
 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_23")
 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_9.result(), SketchArc_2.startPoint())
 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_24")
 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_10.result(), SketchArc_2.endPoint())
 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_25")
-SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchArc_2.endPoint(), 5)
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchArc_2.endPoint(), 5, False)
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_7.result(), "2*l")
 SketchConstraintLength_1.setName("SketchConstraintLength_2")
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_6.result(), "l")
@@ -93,20 +95,26 @@ SketchCircle_10 = Sketch_2.addCircle(49.58498153094326, 15.18789884296047, 2.552
 SketchCircle_11 = Sketch_2.addCircle(66.22695092615982, 10.77677442495125, 4.536925074373645)
 SketchCircle_12 = Sketch_2.addCircle(50.98852111849166, 6.165144351577979, 3.547307159201085)
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchLine_10r-SketchArc_2_2f")])
-Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_9f-SketchLine_10r-SketchArc_1_2f-SketchArc_2_2r")])
-Face_3 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_11_2")])
-Face_4 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_11_2"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchLine_10r-SketchArc_2_2f")])
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
+Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchArc_2_2f-SketchLine_10r_wire")])
+Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_9f-SketchArc_1_2f-SketchLine_10r-SketchArc_2_2r_wire")])
+Face_3_objects = [model.selection("EDGE", "Sketch_2/SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/SketchCircle_11_2")]
+Face_3 = model.addFace(Part_1_doc, Face_3_objects)
+Face_4_objects = [model.selection("EDGE", "Sketch_2/SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/SketchCircle_11_2"), model.selection("WIRE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchArc_2_2f-SketchLine_10r_wire")]
+Face_4 = model.addFace(Part_1_doc, Face_4_objects)
+Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Edge_6&Face_1_1/Edge_7"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "[Face_1_1/Edge_6]e[Face_1_1/Edge_7]e"))
 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
+SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19")
 SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
 SketchLine_13 = Sketch_3.addLine(30, 10, 40, 10)
 SketchLine_14 = Sketch_3.addLine(40, 10, 40, 0)
 SketchConstraintCoincidence_20 = Sketch_3.setCoincident(SketchLine_14.endPoint(), SketchLine_11.startPoint())
+SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_20")
 SketchConstraintCoincidence_21 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint())
+SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_21")
 SketchConstraintCoincidence_22 = Sketch_3.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint())
+SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_22")
 SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint())
 SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_26")
 SketchConstraintHorizontal_4 = Sketch_3.setHorizontal(SketchLine_11.result())
@@ -118,24 +126,26 @@ SketchConstraintEqual_5.setName("SketchConstraintEqual_6")
 SketchConstraintLength_3 = Sketch_3.setLength(SketchLine_13.result(), "l")
 SketchConstraintLength_3.setName("SketchConstraintLength_4")
 model.do()
-Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_11r-SketchLine_12r-SketchLine_13r-SketchLine_14r")])
-MultiTranslation_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
-Recover_1 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"))
-MultiTranslation_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
-Recover_2 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_2&Face_4_1/Edge_3"))
-MultiTranslation_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 4)
-Recover_3 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "LinearCopy_3_1/Translated_Edge_1_4&LinearCopy_3_1/Translated_Edge_1_3"))
-MultiTranslation_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 3)
-Recover_4 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_1&Face_4_1/Edge_9"))
-MultiTranslation_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_1_1_8"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_1_1_5")])
+Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchLine_14r-SketchLine_13r-SketchLine_12r-SketchLine_11r_wire")])
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
+Recover_1 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[Face_4_1/Edge_4]e[Face_4_1/Edge_5]e"))
+LinearCopy_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
+Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[Face_4_1/Edge_2]e[Face_4_1/Edge_3]e"))
+LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 4)
+Recover_3 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Recover_2_1/Shape_2]e"))
+LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 3)
+Recover_4 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "[Face_4_1/Edge_6]e[Face_4_1/Edge_7]e"), model.selection("VERTEX", "[Face_4_1/Edge_1]e[Face_4_1/Edge_9]e"))
+LinearCopy_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
+Group_1_objects = [model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_1_1_8"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_1_1_5")]
+Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
 Group_1.setName("Group_3")
 Group_1.result().setName("assemblages")
-Group_2 = model.addGroup(Part_1_doc, [model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_12")])
+Group_2_objects = [model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_12")]
+Group_2 = model.addGroup(Part_1_doc, Group_2_objects)
 Group_2.setName("Group_1")
 Group_2.result().setName("eau")
 Group_2.result().setColor(0, 170, 255)
@@ -143,8 +153,11 @@ Group_3 = model.addGroup(Part_1_doc, [model.selection("FACE", "Face_4_1")])
 Group_3.setName("Group_2")
 Group_3.result().setName("acier")
 Group_3.result().setColor(170, 85, 0)
-Shell_1 = model.addShell(Part_1_doc, [model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_5"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_1_1_8")])
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_4_1"), model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("SHELL", "Shell_1_1")])
+Shell_1_objects = [model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_5"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_1_1_8")]
+Shell_1 = model.addShell(Part_1_doc, Shell_1_objects)
+Partition_1_objects = [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_4_1"), model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("SHELL", "Shell_1_1")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
+model.do()
 model.end()
 
 # move groups
index 3b4306e64d5474d71022a612f199007d0f7a09f8..2b971addd31857707217339565b72fd5dacb7275 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from salome.shaper import model
 from ModelAPI import *
 from GeomAlgoAPI import *
@@ -44,7 +46,7 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_3.result(), 60)
 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_4.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 90, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 90, 0)
 model.do()
 aSession = ModelAPI_Session.get()
 aSession.setActiveDocument(partSet, False)
index 8697b5d15f77b03564e52fd9bf140938d1c31e73..68e41a29d58dd6565164b4c9163bc5c861fc3f75 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()
@@ -25,14 +27,16 @@ partSet = model.moduleDocument()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchCircle_1 = Sketch_1.addCircle(-9.954190485756755, -75.16051465706819, 60.31858435553394)
+SketchCircle_1 = Sketch_1.addCircle(-9.954190485756754, -75.16051465706819, 60.31858435553394)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")], model.selection(), 10, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
-SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1__cc"), False)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face"))
+SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][Extrusion_1_1/To_Face]__cc"), False)
 SketchPoint_1 = SketchProjection_1.createdFeature()
-SketchCircle_2 = Sketch_2.addCircle(-9.954190485756755, -75.16051465706819, 33.11263086848982)
+SketchCircle_2 = Sketch_2.addCircle(-9.954190485756754, -75.16051465706819, 33.11263086848982)
 SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchPoint_1.result(), SketchCircle_2.center())
+model.do()
+model.do()
 model.end()
 
 assert(model.checkPythonDump())
index 27427d75f37070481f2b42c9e3b4fe8dd9c9e184..46cea4b8864a76c610107954da2d5d45aaf0b559 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 2018-20xx  CEA/DEN, EDF R&D
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from salome.shaper import model
 
 model.begin()
@@ -41,12 +43,12 @@ SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_1.result(), SketchL
 SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_4.result())
 SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(SketchLine_1.result(), SketchLine_4.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 50, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 50, 0)
 Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchCircle_1 = Sketch_2.addCircle(26.06240015364781, 18.07716886601709, 12.23427461205297)
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face_1"), 0, model.selection(), 0)
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face"), 0, model.selection(), 0)
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
 model.do()
 
 Folder_1 = model.addFolder(Part_1_doc, Sketch_1, Extrusion_1)
@@ -57,13 +59,13 @@ Folder_2.setName("Cylinder")
 from GeomAPI import GeomAPI_Shape
 
 # check result shape
-model.testNbResults(Boolean_1, 1)
-model.testNbSubResults(Boolean_1, [0])
-model.testNbSubShapes(Boolean_1, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Boolean_1, GeomAPI_Shape.FACE, [7])
-model.testNbSubShapes(Boolean_1, GeomAPI_Shape.EDGE, [30])
-model.testNbSubShapes(Boolean_1, GeomAPI_Shape.VERTEX, [60])
-model.testResultsVolumes(Boolean_1, [101488.717162133529200218617916107])
+model.testNbResults(Cut_1, 1)
+model.testNbSubResults(Cut_1, [0])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.SOLID, [1])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.FACE, [7])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.EDGE, [30])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.VERTEX, [60])
+model.testResultsVolumes(Cut_1, [101488.717162133529200218617916107])
 
 model.end()
 
index e52fec361983eaeb2da4b8bd01217d71fe8f1b1b..8372ac4ff3a89f48399695a8af9d087663c45d45 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 2018-20xx  CEA/DEN, EDF R&D
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from salome.shaper import model
 
 model.begin()
@@ -42,7 +44,7 @@ SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_1.result(), SketchL
 SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_4.result())
 SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(SketchLine_1.result(), SketchLine_4.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 50, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 50, 0)
 Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("YOZ"))
 SketchLine_5 = Sketch_2.addLine(10, 21.9014765990379, 0, 21.9014765990379)
 SketchLine_5.setName("SketchLine_9")
@@ -74,7 +76,7 @@ SketchConstraintLength_4 = Sketch_2.setLength(SketchLine_8.result(), 10)
 model.do()
 Sketch_2.setName("Sketch_3")
 Sketch_2.result().setName("Sketch_3")
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_11r-SketchLine_12r-SketchLine_13r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchLine_13r-SketchLine_12r-SketchLine_11r-SketchLine_9r_wire")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_10 = Sketch_3.addLine(29.60939424565112, 0, 19.60939424565112, 0)
 SketchLine_10.setName("SketchLine_14")
@@ -107,12 +109,12 @@ model.do()
 Sketch_3.setName("Sketch_4")
 Sketch_3.result().setName("Sketch_4")
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), "h", 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
-Fillet_1_objects = [model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_2_1/Modfied_divided_5_1"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5&Extrusion_1_1/Generated_Face_2"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_6&ExtrusionCut_2_1/Modfied_5"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_2_1/Modfied_divided_4_1"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_1_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_5&ExtrusionCut_1_1/Modfied_1"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&ExtrusionCut_2_1/Modfied_3"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_2_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_6&ExtrusionCut_1_1/Modfied_2"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_divided_4_1&ExtrusionCut_1_1/Modfied_1"), model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&ExtrusionCut_2_1/Modfied_divided_5_1"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_divided_5_1&ExtrusionCut_2_1/Modfied_7"), model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_9")]
+Fillet_1_objects = [model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face][(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_12)(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face)]"), model.selection("EDGE", "[(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_12)(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face)][ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face]"), model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2]"), model.selection("EDGE", "[(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_9)(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3)][ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face][(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_9)(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1)]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face][ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face][ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3][ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face]"), model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face]"), model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3][(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_12)(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face)]"), model.selection("EDGE", "[(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_9)(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3)][ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3]"), model.selection("EDGE", "[(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/From_Face)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_9)(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1)][ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1][(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_12)(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face)]"), model.selection("EDGE", "[(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_12)(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face)][_weak_name_5_ExtrusionCut_2_1]"), model.selection("EDGE", "[(ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_3)(ExtrusionCut_2_1/Modified_Face&Sketch_3/SketchLine_12)(ExtrusionCut_2_1/Modified_Face&Extrusion_1_1/To_Face)][_weak_name_14_ExtrusionCut_2_1]")]
 Fillet_1 = model.addFillet(Part_1_doc, Fillet_1_objects, 2)
-Group_1_objects = [model.selection("FACE", "Fillet_1_1/Modified_Face_3"), model.selection("FACE", "Fillet_1_1/Modified_Face_5"), model.selection("FACE", "Fillet_1_1/Modified_Face_9"), model.selection("FACE", "Fillet_1_1/Modified_Face_15")]
+Group_1_objects = [model.selection("FACE", "Fillet_1_1/Modified_Face&Sketch_1/SketchLine_4&weak_name_1"), model.selection("FACE", "Fillet_1_1/Modified_Face&Sketch_1/SketchLine_4&weak_name_4"), model.selection("FACE", "Fillet_1_1/Modified_Face&Sketch_1/SketchLine_4&weak_name_2"), model.selection("FACE", "Fillet_1_1/Modified_Face&Sketch_1/SketchLine_4&weak_name_3")]
 Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
-Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Fillet_1_1/Fillet_Face_13&Fillet_1_1/Modified_Face_4"), model.selection("EDGE", "Fillet_1_1/Modified_Face_11&Fillet_1_1/Fillet_Face_13")])
-Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Fillet_1_1/Modified_Face_12&ExtrusionCut_1_1/Generated_Face_4&Fillet_1_1/Modified_Face_11"), model.selection("VERTEX", "ExtrusionCut_1_1/Generated_Face_4&Fillet_1_1/Modified_Face_11&Fillet_1_1/Modified_Face_6")])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "[(Fillet_1_1/Modified_Face&Sketch_1/SketchLine_3)(Fillet_1_1/Modified_Face&Extrusion_1_1/To_Face)][Fillet_1_1/Modified_Face&Extrusion_1_1/To_Face]"), model.selection("EDGE", "[Fillet_1_1/Modified_Face&Sketch_1/SketchLine_3][(Fillet_1_1/Modified_Face&Sketch_1/SketchLine_3)(Fillet_1_1/Modified_Face&Extrusion_1_1/To_Face)]")])
+Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "[Fillet_1_1/Modified_Face&Sketch_3/SketchLine_9][ExtrusionCut_1_1/Generated_Face&Sketch_3/SketchLine_13][Fillet_1_1/Modified_Face&Sketch_1/SketchLine_3]"), model.selection("VERTEX", "[ExtrusionCut_1_1/Generated_Face&Sketch_3/SketchLine_13][Fillet_1_1/Modified_Face&Sketch_1/SketchLine_3][Fillet_1_1/Modified_Face&Sketch_3/SketchLine_12]")])
 model.do()
 
 Folder_1 = model.addFolder(Part_1_doc, Sketch_3, ExtrusionCut_2)
index 89121b8a753ca2e835e3be4f7467d57afc8e7a68..8d021171750790337bed30cd963c467bee7505d8 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()
@@ -31,7 +33,7 @@ model.addParameter(Part_1_doc, "Drill2_InnerRadius", "0.5")
 model.addParameter(Part_1_doc, "Drill2_DepthMin", "6.5")
 model.addParameter(Part_1_doc, "Drill2_DepthMax", "7.5")
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchLine_1 = Sketch_1.addLine(64., 0, 0, 0)
+SketchLine_1 = Sketch_1.addLine(64, 0, 0, 0)
 SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
 SketchPoint_1 = SketchProjection_1.createdFeature()
 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchPoint_1.result())
@@ -50,7 +52,7 @@ SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchLine
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_2.result(), 36)
 SketchLine_5 = Sketch_1.addLine(22, 36, 22, 0)
 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_3.result())
-SketchLine_6 = Sketch_1.addLine(32., 36., 32., 0)
+SketchLine_6 = Sketch_1.addLine(32, 36, 32, 0)
 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.startPoint(), SketchLine_3.result())
 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_1.result())
 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_1.result())
@@ -60,8 +62,10 @@ SketchConstraintDistanceHorizontal_2 = Sketch_1.setHorizontalDistance(SketchLine
 SketchConstraintDistanceHorizontal_3 = Sketch_1.setHorizontalDistance(SketchLine_6.startPoint(), SketchLine_3.endPoint(), "Width/2")
 model.do()
 Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_5s"), True)
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchLine_5_StartVertex"), True)
 SketchPoint_2 = SketchProjection_2.createdFeature()
+model.do()
+model.do()
 model.end()
 
 assert(SketchProjection_2.external().namingName() != "")
index 20d2655e046bc838070f2252be0fec271f922fb0..e0c97f8d48d9665db1c9939931d9a44ae8ab236e 100644 (file)
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from SketchAPI import *
+
 from salome.shaper import model
 
 model.begin()
@@ -167,7 +170,7 @@ SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], Sketch
 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_6.result())
 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], "Fillet1")
 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchLine_7.endPoint(), SketchLine_35.result(), "D1_in/2", True)
-SketchConstraintAngle_4 = Sketch_1.setAngleComplementary(SketchLine_23.result(), SketchLine_22.result(), 44.99999999999992)
+SketchConstraintAngle_4 = Sketch_1.setAngleComplementary(SketchLine_23.result(), SketchLine_22.result(), 44.99999999999991)
 SketchConstraintCollinear_4 = Sketch_1.setCollinear(SketchLine_14.result(), SketchLine_9.result())
 SketchConstraintDistanceHorizontal_4 = Sketch_1.setHorizontalDistance(SketchLine_34.startPoint(), SketchLine_23.startPoint(), "Width/32*11")
 SketchConstraintDistanceHorizontal_5 = Sketch_1.setHorizontalDistance(SketchLine_23.startPoint(), SketchLine_22.startPoint(), "Chamfer")
@@ -195,19 +198,19 @@ SketchConstraintDistanceHorizontal_14 = Sketch_1.setHorizontalDistance(SketchLin
 SketchConstraintDistance_11 = Sketch_1.setDistance(SketchLine_23.startPoint(), SketchLine_35.result(), "(D4_out+D2_in)/2", True)
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection("EDGE", "PartSet/OX"), 360, 0)
-Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OY"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), True)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OY"), model.selection("VERTEX", "Sketch_1/SketchPoint_2"), True)
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
-SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), False)
+SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchPoint_2"), False)
 SketchPoint_3 = SketchProjection_3.createdFeature()
-SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Revolution_1_1/Generated_Face_28"), False)
+SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7][weak_name_2]"), False)
 SketchLine_36 = SketchProjection_4.createdFeature()
 SketchCircle_1 = Sketch_2.addCircle(14.5, 0, 2.25)
 SketchConstraintCoincidence_38 = Sketch_2.setCoincident(SketchPoint_3.result(), SketchCircle_1.center())
 SketchConstraintRadius_2 = Sketch_2.setRadius(SketchCircle_1.results()[1], "Drill1_Radius")
 model.do()
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "PartSet/XOZ"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
-Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_14&Revolution_1_1/Generated_Face_15")], "Fillet1")
-Fillet_2_objects = [model.selection("FACE", "Revolution_1_1/Generated_Face_4"), model.selection("FACE", "Revolution_1_1/Generated_Face_6"), model.selection("FACE", "Revolution_1_1/Generated_Face_8"), model.selection("FACE", "Revolution_1_1/Generated_Face_10")]
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_21][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_20]")], "Fillet1")
+Fillet_2_objects = [model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_31"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_29"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_27"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_25")]
 Fillet_2 = model.addFillet(Part_1_doc, Fillet_2_objects, "Fillet2")
 model.do()
 
index a3ef0be37754fb4ec9760dd2b190567628017000..3c744fba10c38237092865b702a8b1afacfc338d 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 2018-20xx  CEA/DEN, EDF R&D
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
-from GeomAPI import *
+# -*- coding: utf-8 -*-
 
 from salome.shaper import model
 
@@ -40,26 +40,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 model.do()
-
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 100, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 100, 0)
 Extrusion_1.result().setName("Cube")
-
-Edge_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"),
-                  model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"),
-                  model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"),
-                  model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"),
-                  model.selection("EDGE", "Cube/Generated_Face_2&Cube/Generated_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_2&Cube/From_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_2&Cube/To_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_3&Cube/Generated_Face_2"),
-                  model.selection("EDGE", "Cube/Generated_Face_1&Cube/From_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_3&Cube/To_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_3&Cube/From_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_1&Cube/To_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_4&Cube/Generated_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_4&Cube/From_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_4&Cube/To_Face_1"),
-                  model.selection("EDGE", "Cube/Generated_Face_4&Cube/Generated_Face_3")]
+Edge_1_objects = [model.selection("EDGE", "Sketch_1/SketchLine_2"), model.selection("EDGE", "Sketch_1/SketchLine_3"), model.selection("EDGE", "Sketch_1/SketchLine_1"), model.selection("EDGE", "Sketch_1/SketchLine_4"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_2][Cube/Generated_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_2][Cube/From_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_2][Cube/To_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_3][Cube/Generated_Face&Sketch_1/SketchLine_2]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_1][Cube/From_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_3][Cube/To_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_3][Cube/From_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_1][Cube/To_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_4][Cube/Generated_Face&Sketch_1/SketchLine_1]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_4][Cube/From_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_4][Cube/To_Face]"), model.selection("EDGE", "[Cube/Generated_Face&Sketch_1/SketchLine_4][Cube/Generated_Face&Sketch_1/SketchLine_3]")]
 Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects)
 # check all the names of Edge_1 results are different
 names = set()
@@ -70,7 +53,7 @@ assert(len(names) == len(Edge_1.results())), "Some edges have equal name"
 Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
 SketchCircle_1 = Sketch_2.addCircle(200, 0, 50)
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f")], model.selection("EDGE", "Cube"), 10, 0)
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2r")], model.selection("EDGE", "Cube"), 10, 0)
 model.do()
 # check Extrusion_2
 model.testNbResults(Extrusion_2, 1)
index abf10ad1edd15e385feb39a396823b11708e6199..80869d143098ce66184482025a677362dda7eeb7 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()
@@ -51,8 +53,8 @@ SketchConstraintEqual_2 = Sketch_1.setEqual(SketchLine_5.result(), SketchLine_1.
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 3)
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_7.result(), 8)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_7r")], model.selection(), 5, 0)
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 5, True)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_7r-SketchLine_5r-SketchLine_4r-SketchLine_3r-SketchLine_1r")], model.selection(), 5, 0)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_5"), 5, True)
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchLine_8 = Sketch_2.addLine(7.560741003605092, 9.43062705614625, -1.095841663628257, 9.43062705614625)
 SketchLine_9 = Sketch_2.addLine(-1.095841663628257, 9.43062705614625, -1.095841663628257, -5.449377136847041)
@@ -67,8 +69,8 @@ SketchConstraintVertical_2 = Sketch_2.setVertical(SketchLine_9.result())
 SketchConstraintHorizontal_2 = Sketch_2.setHorizontal(SketchLine_10.result())
 SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_11.result())
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_8f-SketchLine_9f-SketchLine_10f-SketchLine_11f")])
-Boolean_1 = model.addFill(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("FACE", "Face_1_1")])
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_8r-SketchLine_9f-SketchLine_10f-SketchLine_11f")])
+Fill_1 = model.addFill(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("FACE", "Face_1_1")])
 model.do()
 
 # now add an additional edge to the first sketch as it is described in the issue
@@ -76,10 +78,10 @@ SketchLine_8 = Sketch_1.addLine(0, 3, 8, 3)
 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_8.startPoint())
 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_8.endPoint())
 model.do()
-Part_1_doc.setCurrentFeature(Boolean_1.feature(), True)
+Part_1_doc.setCurrentFeature(Fill_1.feature(), True)
 model.end()
 
 # check that the plane is located as previously
-model.testNbSubResults(Boolean_1, [2])
-model.testResultsVolumes(Boolean_1, [120])
+model.testNbSubResults(Fill_1, [2])
+model.testResultsVolumes(Fill_1, [120])
 assert(model.checkPythonDump())
index cb70bf6847dea8a3efece1becf0c29cedf52c945..0ef8930c226c60d85b6d3f98837817a0789c9a24 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()
@@ -47,9 +49,9 @@ SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchArc_1.startPoint(),
 SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_8")
 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 50)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchArc_1_2f-SketchLine_3f")], model.selection(), 100, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_3f-SketchArc_1_2f-SketchLine_1r")], model.selection(), 100, 0)
 model.do()
-Solid_1_objects = [model.selection("FACE", "Extrusion_1_1/Generated_Face_3")]
+Solid_1_objects = [model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3")]
 Solid_1 = model.addSolid(Part_1_doc, Solid_1_objects)
 # check that resulting build-solid feature is invalid: only one not-closed face is used
 from ModelAPI import *
@@ -58,7 +60,7 @@ assert(aFactory.validate(Solid_1.feature()) == False)
 ModelAPI_Session.get().abortOperation()
 # another try: to make a solid with a face inside
 model.begin()
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"), 70, True)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face"), 70, True)
 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchLine_5 = Sketch_2.addLine(14.9039069695087, 8.923908092675951, 26.86805702948195, 11.13714035991706)
 SketchLine_6 = Sketch_2.addLine(26.86805702948195, 11.13714035991706, 18.50962242738747, 32.13572332177004)
@@ -70,11 +72,10 @@ SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_10")
 SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_5.startPoint(), SketchLine_7.endPoint())
 SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_11")
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_5f-SketchLine_6f-SketchLine_7f")])
-Solid_2_objects = [model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), model.selection("FACE", "Extrusion_1_1/Generated_Face_2"), model.selection("FACE", "Extrusion_1_1/To_Face_1"), model.selection("FACE", "Extrusion_1_1/From_Face_1"), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), model.selection("FACE", "Face_1_1")]
-Solid_2 = model.addSolid(Part_1_doc, Solid_2_objects)
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_5r-SketchLine_6f-SketchLine_7f")])
+Solid_1_objects = [model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3"), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchArc_1_2"), model.selection("FACE", "Extrusion_1_1/To_Face"), model.selection("FACE", "Extrusion_1_1/From_Face"), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1"), model.selection("FACE", "Face_1_1")]
+Solid_1 = model.addSolid(Part_1_doc, Solid_1_objects)
+model.do()
 model.end()
 
-assert(aFactory.validate(Solid_2.feature()) == False)
-
 assert(model.checkPythonDump())
index 9fefd083133ca5f5e9c058c4c400487431a2442f..d17dc6161630df9b08c999bef2c33392872dc495 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 2018-20xx  CEA/DEN, EDF R&D
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from salome.shaper import model
 
 model.begin()
@@ -38,13 +40,13 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")])
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r"))
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")])
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r"))
 SketchCircle_1 = Sketch_2.addCircle(0, -10, 25)
 model.do()
-Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f")])
+Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2r")])
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1")])
-Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Face_2_1/Face_2_1"), model.selection("FACE", "Partition_1_1_1")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Partition_1_1_1"), model.selection("COMPOUND", "Partition_1_1")])
 model.do()
 
 assert(Group_1.feature().error() == "")
index 09838dd7a48bdb86502320a75a10785519bdcfbd..9c0ece97a0efb7d51c93efb3989ea6bb74f9dfad 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 2018-20xx  CEA/DEN, EDF R&D
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from SketchAPI import *
 
 from salome.shaper import model
@@ -65,7 +67,7 @@ SketchLine_7.result().setName("SketchLine_8")
 SketchLine_7.setAuxiliary(True)
 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_7.startPoint())
 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_7.endPoint())
-SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_7.result(), SketchLine_3.result(), 93.56999999999999)
+SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_7.result(), SketchLine_3.result(), 93.56999999998719)
 SketchArc_2 = Sketch_1.addArc(2.349985665002739, 1.087256027998574, 2.499428733897898, 3.48259875277915, 3.77688682869805, 3.017010693505298, True)
 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchArc_2.startPoint())
 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchArc_2.results()[1])
@@ -79,14 +81,14 @@ SketchLine_8.setName("SketchLine_9")
 SketchLine_8.result().setName("SketchLine_9")
 SketchLine_8.setAuxiliary(True)
 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_8.endPoint())
-SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_8.result(), SketchLine_7.result(), 32.91)
+SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_8.result(), SketchLine_7.result(), 32.91000000001281)
 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_8.startPoint(), SketchArc_2.center())
 SketchLine_9 = Sketch_1.addLine(1.546759218272496, 0.000964964207000808, 4.166514953924199, 2.685528408329715)
 SketchLine_9.setName("SketchLine_10")
 SketchLine_9.result().setName("SketchLine_10")
 SketchLine_9.setAuxiliary(True)
 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_9.endPoint())
-SketchConstraintAngle_3 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_8.result(), 7.82)
+SketchConstraintAngle_3 = Sketch_1.setAngle(SketchLine_9.result(), SketchLine_8.result(), 7.820000000000003)
 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_9.startPoint(), SketchArc_3.center())
 SketchLine_10 = Sketch_1.addLine(4.166514953924199, 2.685528408329715, 4.411514953924289, 2.446442922550623)
 SketchLine_10.setName("SketchLine_11")
@@ -109,7 +111,7 @@ SketchLine_12.result().setName("SketchLine_13")
 SketchLine_12.setAuxiliary(True)
 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchArc_4.center(), SketchLine_12.startPoint())
 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchLine_12.endPoint())
-SketchConstraintAngle_4 = Sketch_1.setAngleBackward(SketchLine_11.result(), SketchLine_12.result(), 8.018000000000001)
+SketchConstraintAngle_4 = Sketch_1.setAngleBackward(SketchLine_11.result(), SketchLine_12.result(), 8.018000000993595)
 SketchConstraintRadius_4 = Sketch_1.setRadius(SketchArc_4.results()[1], 1.32)
 SketchArc_5 = Sketch_1.addArc(1.545335047953034, 0, 4.534275383417573, 2.308616054576027, 3.791202568545627, -3.03637143583555, True)
 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchArc_5.startPoint())
@@ -154,6 +156,18 @@ SketchLine_17.result().setName("SketchLine_18")
 SketchArc_11.setName("SketchArc_14")
 SketchArc_11.result().setName("SketchArc_14")
 SketchArc_11.results()[1].setName("SketchArc_14_2")
+SketchArc_10.setName("SketchArc_10")
+SketchArc_10.result().setName("SketchArc_10")
+SketchArc_10.results()[1].setName("SketchArc_10_2")
+SketchArc_9.setName("SketchArc_9")
+SketchArc_9.result().setName("SketchArc_9")
+SketchArc_9.results()[1].setName("SketchArc_9_2")
+SketchLine_16.setName("SketchLine_16")
+SketchLine_16.result().setName("SketchLine_16")
+SketchLine_15.setName("SketchLine_15")
+SketchLine_15.result().setName("SketchLine_15")
+SketchLine_14.setName("SketchLine_14")
+SketchLine_14.result().setName("SketchLine_14")
 SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchArc_8.startPoint())
 SketchConstraintTangent_9 = Sketch_1.setTangent(SketchArc_7.results()[1], SketchArc_8.results()[1])
 SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchLine_5.result(), SketchArc_8.endPoint())
@@ -190,13 +204,13 @@ SketchArc_15.setName("SketchArc_18")
 SketchArc_15.result().setName("SketchArc_18")
 SketchArc_15.results()[1].setName("SketchArc_18_2")
 SketchConstraintCoincidence_42 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchArc_15.startPoint())
-SketchConstraintTangent_12 = Sketch_1.setTangent(SketchArc_14.results()[1], SketchArc_15.results()[1])
+SketchConstraintTangent_11 = Sketch_1.setTangent(SketchArc_14.results()[1], SketchArc_15.results()[1])
 SketchArc_16 = Sketch_1.addArc(1.552616124088898, 0, 3.904833906055851, 3.190047534283911, 5.51611606287941, 0, True)
 SketchArc_16.setName("SketchArc_19")
 SketchArc_16.result().setName("SketchArc_19")
 SketchArc_16.results()[1].setName("SketchArc_19_2")
 SketchConstraintCoincidence_43 = Sketch_1.setCoincident(SketchArc_15.endPoint(), SketchArc_16.startPoint())
-SketchConstraintTangent_13 = Sketch_1.setTangent(SketchArc_15.results()[1], SketchArc_16.results()[1])
+SketchConstraintTangent_12 = Sketch_1.setTangent(SketchArc_15.results()[1], SketchArc_16.results()[1])
 SketchConstraintCoincidence_44 = Sketch_1.setCoincident(SketchLine_5.result(), SketchArc_16.endPoint())
 SketchConstraintCoincidence_45 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchLine_13.result())
 SketchConstraintCoincidence_46 = Sketch_1.setCoincident(SketchArc_14.center(), SketchArc_6.center())
@@ -214,7 +228,7 @@ SketchConstraintCoincidence_50 = Sketch_1.setCoincident(SketchLine_20.endPoint()
 SketchConstraintCoincidence_51 = Sketch_1.setCoincident(SketchLine_21.endPoint(), SketchLine_3.result())
 SketchConstraintVertical_5 = Sketch_1.setVertical(SketchLine_20.result())
 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_21.endPoint(), SketchLine_20.result(), 0.03, True)
-SketchConstraintAngle_5 = Sketch_1.setAngle(SketchLine_20.result(), SketchLine_21.result(), 170)
+SketchConstraintAngle_5 = Sketch_1.setAngle(SketchLine_20.result(), SketchLine_21.result(), 169.9999999984344)
 SketchConstraintDistance_7 = Sketch_1.setDistance(SketchLine_21.endPoint(), SketchLine_19.result(), 0.045, True)
 SketchArc_17 = Sketch_1.addArc(2.429999974807022, 2.369762445224826, 1.08, 2.370000000000011, 2.429999974807022, 3.719762440932702, True)
 SketchArc_17.setName("SketchArc_23")
@@ -250,6 +264,15 @@ SketchArc_23.result().setName("SketchArc_26")
 SketchArc_23.results()[1].setName("SketchArc_26_2")
 SketchLine_23.setName("SketchLine_24")
 SketchLine_23.result().setName("SketchLine_24")
+SketchArc_22.setName("SketchArc_22")
+SketchArc_22.result().setName("SketchArc_22")
+SketchArc_22.results()[1].setName("SketchArc_22_2")
+SketchArc_21.setName("SketchArc_21")
+SketchArc_21.result().setName("SketchArc_21")
+SketchArc_21.results()[1].setName("SketchArc_21_2")
+SketchArc_20.setName("SketchArc_20")
+SketchArc_20.result().setName("SketchArc_20")
+SketchArc_20.results()[1].setName("SketchArc_20_2")
 SketchLine_22.setName("SketchLine_21")
 SketchLine_22.result().setName("SketchLine_21")
 SketchConstraintCoincidence_58 = Sketch_1.setCoincident(SketchArc_18.endPoint(), SketchArc_19.startPoint())
@@ -293,7 +316,7 @@ SketchLine_31.result().setName("SketchLine_32")
 SketchLine_31.setAuxiliary(True)
 SketchConstraintCoincidence_75 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_31.startPoint())
 SketchConstraintCoincidence_76 = Sketch_1.setCoincident(SketchLine_31.endPoint(), SketchArc_1.results()[1])
-SketchConstraintAngle_6 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_3.result(), 59.94)
+SketchConstraintAngle_6 = Sketch_1.setAngle(SketchLine_31.result(), SketchLine_3.result(), 59.93999999988066)
 SketchLine_32 = Sketch_1.addLine(1.871489087529827, 3.334796428456965, 1.871489087529827, 3.598813126524882)
 SketchLine_32.setName("SketchLine_33")
 SketchLine_32.result().setName("SketchLine_33")
@@ -308,14 +331,14 @@ SketchConstraintCoincidence_80 = Sketch_1.setCoincident(SketchLine_33.endPoint()
 SketchConstraintCoincidence_81 = Sketch_1.setCoincident(SketchLine_33.startPoint(), SketchLine_32.result())
 SketchConstraintVertical_7 = Sketch_1.setVertical(SketchLine_33.result())
 model.do()
-Extrusion_1_objects = [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1r-SketchLine_2f-SketchArc_1_2r-SketchLine_5f-SketchArc_11_2f-SketchLine_14r-SketchLine_15f-SketchLine_16r-SketchArc_9_2f-SketchArc_15_2r-SketchLine_33f-SketchLine_34r"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_1_2r-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_12_2f-SketchArc_13_2f-SketchArc_10_2f-SketchArc_14_2f-SketchArc_16_2r-SketchLine_29f-SketchLine_30r"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_20f-SketchArc_17_2r-SketchLine_21r-SketchArc_20_2r-SketchLine_22r-SketchLine_23r-SketchArc_23_2f-SketchLine_24f-SketchArc_27_2f-SketchLine_25f-SketchLine_33f-SketchLine_34r"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_18_2r-SketchArc_19_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_24_2f-SketchArc_25_2f-SketchArc_26_2f-SketchArc_28_2f-SketchLine_28f-SketchLine_31f"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_17_2r-SketchArc_23_2f-SketchLine_28r-SketchLine_33r"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_1_2r-SketchArc_11_2f-SketchLine_29r-SketchLine_33r"), model.selection("FACE", "Sketch_1/Face-SketchArc_9_2f-SketchArc_15_2r-SketchLine_30f-SketchLine_34f"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_20_2r-SketchArc_27_2f-SketchLine_31r-SketchLine_34f")]
+Extrusion_1_objects = [model.selection("WIRE", "Sketch_1/Face-SketchLine_5f-SketchArc_1_2r-SketchLine_33f-SketchArc_11_2f-SketchLine_2f-SketchLine_14r-SketchArc_9_2f-SketchLine_34r-SketchArc_15_2r-SketchLine_16r-SketchLine_15f-SketchLine_1r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_16_2r-SketchLine_30r-SketchArc_10_2f-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2f-SketchLine_29f-SketchArc_1_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_20f-SketchArc_17_2r-SketchLine_33f-SketchArc_23_2f-SketchLine_23r-SketchLine_22r-SketchLine_24f-SketchLine_25f-SketchArc_27_2f-SketchLine_34r-SketchArc_20_2r-SketchLine_21r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchArc_19_2r-SketchArc_22_2r-SketchArc_21_2r-SketchLine_31f-SketchArc_28_2f-SketchArc_26_2f-SketchArc_25_2f-SketchArc_24_2f-SketchLine_28f-SketchArc_18_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_28r-SketchArc_23_2f-SketchLine_33r-SketchArc_17_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_29r-SketchArc_11_2f-SketchLine_33r-SketchArc_1_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchArc_9_2f-SketchLine_30f-SketchArc_15_2r-SketchLine_34f"), model.selection("WIRE", "Sketch_1/Face-SketchLine_34f-SketchArc_27_2f-SketchLine_31r-SketchArc_20_2r_wire")]
 Extrusion_1 = model.addExtrusion(Part_1_doc, Extrusion_1_objects, model.selection(), 0.1785, 0.1785)
-Extrusion_2_objects = [model.selection("WIRE", "Sketch_1/Wire-SketchArc_12_2r-SketchArc_13_2r-SketchArc_10_2r-SketchArc_14_2r-SketchArc_18_2f-SketchArc_19_2f-SketchArc_21_2f-SketchArc_22_2f-SketchLine_26f-SketchLine_27r"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_1_2r-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_12_2f-SketchArc_13_2f-SketchArc_10_2f-SketchArc_14_2f-SketchArc_16_2r-SketchLine_29f-SketchLine_30r"), model.selection("FACE", "Sketch_1/Face-SketchArc_18_2r-SketchArc_19_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_24_2f-SketchArc_25_2f-SketchArc_26_2f-SketchArc_28_2f-SketchLine_28f-SketchLine_31f")]
-Extrusion_2 = model.addExtrusion(Part_1_doc, Extrusion_2_objects, model.selection(), model.selection("FACE", "Extrusion_1_2/From_Face_2"), -0.05, model.selection("FACE", "Extrusion_1_2/From_Face_2"), 0)
-Extrusion_3_objects = [model.selection("FACE", "Sketch_1/Face-SketchArc_12_2r-SketchArc_13_2r-SketchArc_10_2r-SketchArc_14_2r-SketchArc_18_2f-SketchArc_19_2f-SketchArc_21_2f-SketchArc_22_2f-SketchLine_26f-SketchLine_27r"), model.selection("FACE", "Sketch_1/Face-SketchArc_18_2r-SketchArc_19_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_24_2f-SketchArc_25_2f-SketchArc_26_2f-SketchArc_28_2f-SketchLine_28f-SketchLine_31f"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_1_2r-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_12_2f-SketchArc_13_2f-SketchArc_10_2f-SketchArc_14_2f-SketchArc_16_2r-SketchLine_29f-SketchLine_30r")]
-Extrusion_3 = model.addExtrusion(Part_1_doc, Extrusion_3_objects, model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face_1"), 0.05, model.selection("FACE", "Extrusion_1_2/To_Face_1"), 0)
-Extrusion_4_objects = [model.selection("FACE", "Sketch_1/Face-SketchArc_17_2r-SketchArc_23_2f-SketchLine_28r-SketchLine_33r"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_1_2r-SketchArc_11_2f-SketchLine_29r-SketchLine_33r"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_11_2r-SketchArc_17_2f-SketchLine_27f-SketchLine_33r"), model.selection("FACE", "Sketch_1/Face-SketchArc_20_2r-SketchArc_27_2f-SketchLine_31r-SketchLine_34f"), model.selection("FACE", "Sketch_1/Face-SketchArc_9_2r-SketchArc_20_2f-SketchLine_26r-SketchLine_34f"), model.selection("WIRE", "Sketch_1/Wire-SketchArc_9_2f-SketchArc_15_2r-SketchLine_30f-SketchLine_34f")]
-Extrusion_4 = model.addExtrusion(Part_1_doc, Extrusion_4_objects, model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face_2"), 0.15, model.selection("FACE", "Extrusion_1_1/To_Face_2"), 0)
+Extrusion_2_objects = [model.selection("WIRE", "Sketch_1/Face-SketchArc_13_2r-SketchArc_14_2r-SketchArc_10_2r-SketchLine_26f-SketchArc_21_2f-SketchArc_22_2f-SketchArc_19_2f-SketchArc_18_2f-SketchLine_27r-SketchArc_12_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_16_2r-SketchLine_30r-SketchArc_10_2f-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2f-SketchLine_29f-SketchArc_1_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchArc_19_2r-SketchArc_22_2r-SketchArc_21_2r-SketchLine_31f-SketchArc_28_2f-SketchArc_26_2f-SketchArc_25_2f-SketchArc_24_2f-SketchLine_28f-SketchArc_18_2r")]
+Extrusion_2 = model.addExtrusion(Part_1_doc, Extrusion_2_objects, model.selection(), model.selection("FACE", "Extrusion_1_2_2/From_Face"), -0.05, model.selection("FACE", "Extrusion_1_2_2/From_Face"), 0)
+Extrusion_3_objects = [model.selection("FACE", "Sketch_1/Face-SketchArc_13_2r-SketchArc_14_2r-SketchArc_10_2r-SketchLine_26f-SketchArc_21_2f-SketchArc_22_2f-SketchArc_19_2f-SketchArc_18_2f-SketchLine_27r-SketchArc_12_2r"), model.selection("FACE", "Sketch_1/Face-SketchArc_19_2r-SketchArc_22_2r-SketchArc_21_2r-SketchLine_31f-SketchArc_28_2f-SketchArc_26_2f-SketchArc_25_2f-SketchArc_24_2f-SketchLine_28f-SketchArc_18_2r"), model.selection("WIRE", "Sketch_1/Face-SketchArc_2_2r-SketchArc_3_2r-SketchLine_11f-SketchArc_4_2r-SketchArc_5_2r-SketchArc_16_2r-SketchLine_30r-SketchArc_10_2f-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2f-SketchLine_29f-SketchArc_1_2r_wire")]
+Extrusion_3 = model.addExtrusion(Part_1_doc, Extrusion_3_objects, model.selection(), model.selection("FACE", "Extrusion_1_1_1/To_Face"), 0.05, model.selection("FACE", "Extrusion_1_2_1/To_Face"), 0)
+Extrusion_4_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_28r-SketchArc_23_2f-SketchLine_33r-SketchArc_17_2r"), model.selection("WIRE", "Sketch_1/Face-SketchLine_29r-SketchArc_11_2f-SketchLine_33r-SketchArc_1_2r_wire"), model.selection("WIRE", "Sketch_1/Face-SketchLine_27f-SketchArc_17_2f-SketchLine_33r-SketchArc_11_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchLine_34f-SketchArc_27_2f-SketchLine_31r-SketchArc_20_2r"), model.selection("FACE", "Sketch_1/Face-SketchLine_34f-SketchArc_20_2f-SketchLine_26r-SketchArc_9_2r"), model.selection("WIRE", "Sketch_1/Face-SketchArc_9_2f-SketchLine_30f-SketchArc_15_2r-SketchLine_34f_wire")]
+Extrusion_4 = model.addExtrusion(Part_1_doc, Extrusion_4_objects, model.selection(), model.selection("FACE", "Extrusion_1_1_2/To_Face"), 0.15, model.selection("FACE", "Extrusion_1_1_2/To_Face"), 0)
 Extrusion_4.setName("Extrusion_6")
 Extrusion_4.result().setName("Extrusion_6_1")
 Extrusion_4.result().subResult(0).setName("Extrusion_6_1_1")
@@ -325,8 +348,8 @@ Extrusion_4.results()[1].setName("Extrusion_6_2")
 Extrusion_4.results()[1].subResult(0).setName("Extrusion_6_2_1")
 Extrusion_4.results()[1].subResult(1).setName("Extrusion_6_2_2")
 Extrusion_4.results()[1].subResult(2).setName("Extrusion_6_2_3")
-Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Extrusion_3_1/To_Face_3&Extrusion_3_1/Generated_Face_10&Extrusion_3_1/Generated_Face_11"), model.selection("VERTEX", "Extrusion_6_1/To_Face_1&Extrusion_6_1/Generated_Face_9&Extrusion_6_1/Generated_Face_8"))
-Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "Axis_1"), model.selection("VERTEX", "Extrusion_6_1/Generated_Face_3&Extrusion_6_1/To_Face_3&Extrusion_6_1/Generated_Face_4"), False)
+Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "[Extrusion_3_1_3/To_Face][Extrusion_3_1_3/Generated_Face&Sketch_1/SketchLine_28][Extrusion_3_1_3/Generated_Face&Sketch_1/SketchArc_24_2]"), model.selection("VERTEX", "[Extrusion_6_1_1/To_Face][Extrusion_6_1_1/Generated_Face&Sketch_1/SketchArc_23_2][Extrusion_6_1_1/Generated_Face&Sketch_1/SketchLine_33]"))
+Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "Axis_1"), model.selection("VERTEX", "[Extrusion_6_1_3/Generated_Face&Sketch_1/SketchArc_1_2][Extrusion_6_1_3/To_Face][Extrusion_6_1_3/Generated_Face&Sketch_1/SketchLine_33]"), False)
 Partition_1_objects = [model.selection("COMPSOLID", "Extrusion_6_1"), model.selection("FACE", "Plane_1"), model.selection("COMPSOLID", "Extrusion_6_2")]
 Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
 model.do()
index 5eb24bc40250c3a57b256c2e5c2e74e53ace80f2..0d368254f4f73fdc56b09e3add03ffad442f7c77 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from SketchAPI import *
 
 from salome.shaper import model
@@ -45,9 +47,9 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_3.result(), 70)
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_2.result(), 50)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 10, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 10, 0)
 Extrusion_1.result().setName("box")
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r"))
 SketchLine_5 = Sketch_2.addLine(10, 55, 50, 55)
 SketchLine_6 = Sketch_2.addLine(50, 55, 50, -5)
 SketchLine_7 = Sketch_2.addLine(50, -5, 10, -5)
@@ -67,12 +69,12 @@ SketchConstraintDistanceHorizontal_1 = Sketch_2.setHorizontalDistance(SketchLine
 SketchConstraintLength_3 = Sketch_2.setLength(SketchLine_8.result(), 60)
 SketchConstraintLength_4 = Sketch_2.setLength(SketchLine_7.result(), 40)
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r-SketchLine_8r")], model.selection(), 15, 5)
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchLine_5r")], model.selection(), 15, 5)
 Extrusion_2.result().setName("tool")
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "box")], [model.selection("SOLID", "tool")])
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "box")], [model.selection("SOLID", "tool")])
 model.do()
 
-assert(Boolean_1.result().name() == Extrusion_1.result().name()), "Boolean CUT name '{}' != '{}'".format(Boolean_1.result().name(), Extrusion_1.result().name())
+assert(Cut_1.result().name() == Extrusion_1.result().name()), "Boolean CUT name '{}' != '{}'".format(Cut_1.result().name(), Extrusion_1.result().name())
 
 model.end()
 
index 8e1e7944f14141d7741c4179e944ebfac6d5bda2..b6051222fc6cfe6a19b36b1c732e234615bd9a4c 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()
@@ -28,30 +30,30 @@ Box_1 = model.addBox(Part_1_doc, 100, 100, 10)
 Box_1.result().setName("plate")
 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "plate/Front"), 50, True)
 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "plate/Left"), 50, True)
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "plate"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")])
-#Partition_1.result().setName("plate")
+Partition_1_objects = [model.selection("SOLID", "plate"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
 Partition_1.result().subResult(0).setName("Partition_1_1_1")
 Partition_1.result().subResult(1).setName("top_left")
 Partition_1.result().subResult(2).setName("bottom_right")
 Partition_1.result().subResult(3).setName("Partition_1_1_4")
-Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Partition_1_1_1/Modified_Face_3_3"))
-SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "Partition_1_1_1/Modified_Face_3_3&top_left/Modified_Face_3_1&bottom_right/Modified_Face_3_2"), False)
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Partition_1_1_1/Modified_Face&_plate/Top"))
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "[Partition_1_1_1/Modified_Face&_plate/Top][_weak_name_5_Partition_1_1_1][_weak_name_6_Partition_1_1_1]"), False)
 SketchPoint_1 = SketchProjection_1.createdFeature()
 SketchCircle_1 = Sketch_1.addCircle(50, 50, 40)
 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 40)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection(), 10, model.selection("FACE", "Partition_1_1_1/Modified_Face_3_4"), 10)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection(), 10, model.selection("FACE", "Partition_1_1_1/Modified_Face&_plate/Bottom"), 10)
 Extrusion_1.result().setName("cylinder")
-Boolean_1 = model.addCommon(Part_1_doc, [model.selection("COMPSOLID", "plate")], [model.selection("SOLID", "cylinder")])
+Common_1 = model.addCommon(Part_1_doc, [model.selection("COMPSOLID", "plate")], [model.selection("SOLID", "cylinder")])
 model.do()
 
 # check the name of result is kept
-CommonResult = Boolean_1.result()
+CommonResult = Common_1.result()
 CommonResultName = CommonResult.name()
 assert(CommonResultName == Partition_1.result().name()), "Name of Boolean COMMON result '{}' != '{}'".format(CommonResultName, Partition_1.result().name())
 # check sub-result names are lost
-BooleanName = Boolean_1.name() + "_1"
+BooleanName = Common_1.name() + "_1"
 for i in range(0, CommonResult.numberOfSubs()):
   refName = BooleanName + '_' + str(i + 1)
   subResult = CommonResult.subResult(i)
index 7da2b0e44bfe9b9a8a6134164098b2cf60c8f061..13760a4f45a0674695a95cf677ef3cafa665b2ee 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from SketchAPI import *
 
 from salome.shaper import model
@@ -26,7 +28,6 @@ model.begin()
 partSet = model.moduleDocument()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
-
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
 SketchLine_1 = Sketch_1.addLine(80, 0, 0, 0)
 SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
@@ -58,27 +59,26 @@ SketchConstraintDistanceVertical_2 = Sketch_1.setVerticalDistance(SketchLine_6.e
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 50, 0)
 Extrusion_1.result().setName("compsolid")
-
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "compsolid/Generated_Face_5"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1_4/Generated_Face&Sketch_1/SketchLine_5"))
 SketchCircle_1 = Sketch_2.addCircle(65, -30, 10)
 SketchConstraintRadius_1 = Sketch_2.setRadius(SketchCircle_1.results()[1], 10)
-SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "compsolid/Generated_Face_5&compsolid/Generated_Face_4&compsolid/To_Face_3"), False)
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1_3/Generated_Face&Sketch_1/SketchLine_5][Extrusion_1_1_3/Generated_Face&Sketch_1/SketchLine_3][Extrusion_1_1_3/To_Face]"), False)
 SketchPoint_2 = SketchProjection_2.createdFeature()
 SketchConstraintDistanceVertical_3 = Sketch_2.setVerticalDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchCircle_1.center(), 20)
 SketchConstraintDistanceHorizontal_2 = Sketch_2.setHorizontalDistance(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_2).coordinates(), 15)
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f")], model.selection(), model.selection(), 10, model.selection("FACE", "compsolid/Generated_Face_1"), 10)
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2r")], model.selection(), model.selection(), 10, model.selection("FACE", "Extrusion_1_1_4/Generated_Face&Sketch_1/SketchLine_3"), 10)
 Extrusion_2.result().setName("cyl")
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_3")], [model.selection("SOLID", "cyl")])
 
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_3")], [model.selection("SOLID", "cyl")])
 model.do()
 
 # check the name of Extrusion_1 is kept
-CutResult = Boolean_1.result()
+CutResult = Cut_1.result()
 CutResultName = CutResult.name()
 assert(CutResultName == Extrusion_1.result().name()), "Name of Boolean CUT result '{}' != '{}'".format(CutResultName, Extrusion_1.result().name())
 # check sub-result names are lost
-BooleanName = Boolean_1.name() + "_1"
+BooleanName = Cut_1.name() + "_1"
 for i in range(0, CutResult.numberOfSubs()):
   refName = BooleanName + '_' + str(i + 1)
   subResult = CutResult.subResult(i)
index ca2ac6c92655074b93f2af128991e49c5253191c..850b6f0f8b30c3600daa873ca370f46e5719f573 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from SketchAPI import *
 
 from salome.shaper import model
@@ -61,17 +63,17 @@ SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_7.result(), 35)
 SketchConstraintDistanceHorizontal_2 = Sketch_1.setHorizontalDistance(SketchLine_5.endPoint(), SketchLine_2.startPoint(), 30)
 SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchLine_5.endPoint(), SketchLine_2.startPoint(), 15)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 10, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 10, 0)
 Extrusion_1.result().setName("box")
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r")], model.selection(), 20, 20)
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_7r-SketchLine_6r-SketchLine_5r")], model.selection(), 20, 20)
 Extrusion_2.result().setName("prism")
 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")], model.selection(), 10, 0)
 Extrusion_3.result().setName("cylinder")
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "box/From_Face_1"))
-SketchLine_8 = Sketch_2.addLine(45, 30, 25, 30)
-SketchLine_9 = Sketch_2.addLine(25, 30, 25, -100)
-SketchLine_10 = Sketch_2.addLine(25, -100, 45, -100)
-SketchLine_11 = Sketch_2.addLine(45, -100, 45, 30)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "box/From_Face"))
+SketchLine_8 = Sketch_2.addLine(45, -10, 25, -10)
+SketchLine_9 = Sketch_2.addLine(25, -10, 25, -140)
+SketchLine_10 = Sketch_2.addLine(25, -140, 45, -140)
+SketchLine_11 = Sketch_2.addLine(45, -140, 45, -10)
 SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_8.startPoint())
 SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
 SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint())
@@ -82,21 +84,22 @@ SketchConstraintHorizontal_5 = Sketch_2.setHorizontal(SketchLine_10.result())
 SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_11.result())
 SketchConstraintLength_4 = Sketch_2.setLength(SketchLine_10.result(), 20)
 SketchConstraintLength_5 = Sketch_2.setLength(SketchLine_9.result(), 130)
-SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "box/Generated_Face_3&box/Generated_Face_2&box/From_Face_1"), False)
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "[box/Generated_Face&Sketch_1/SketchLine_3][box/Generated_Face&Sketch_1/SketchLine_2][box/From_Face]"), False)
 SketchPoint_2 = SketchProjection_2.createdFeature()
 SketchConstraintDistanceVertical_2 = Sketch_2.setVerticalDistance(SketchLine_8.endPoint(), SketchAPI_Point(SketchPoint_2).coordinates(), 30)
 SketchConstraintDistanceHorizontal_3 = Sketch_2.setHorizontalDistance(SketchLine_8.endPoint(), SketchAPI_Point(SketchPoint_2).coordinates(), 25)
 model.do()
-Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_8f-SketchLine_9f-SketchLine_10f-SketchLine_11f")], model.selection(), 5, 15)
+Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_8r-SketchLine_9f-SketchLine_10f-SketchLine_11f")], model.selection(), 5, 15)
 Extrusion_4.result().setName("cut_tool")
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "box"), model.selection("SOLID", "prism"), model.selection("SOLID", "cylinder")], [model.selection("SOLID", "cut_tool")])
+Cut_1_objects_1 = [model.selection("SOLID", "box"), model.selection("SOLID", "prism"), model.selection("SOLID", "cylinder")]
+Cut_1 = model.addCut(Part_1_doc, Cut_1_objects_1, [model.selection("SOLID", "cut_tool")])
 model.do()
 
 Extrusions = [Extrusion_1, Extrusion_2, Extrusion_3]
-BooleanResults = Boolean_1.results()
+BooleanResults = Cut_1.results()
 for i in range(len(BooleanResults)):
   assert(BooleanResults[i].name() == Extrusions[i].result().name()), "Name of result {} of Boolean CUT '{}' != '{}'".format(i, BooleanResults[i].name(), Extrusions[i].result().name())
-  BooleanName = Boolean_1.name() + "_" + str(i + 1)
+  BooleanName = Cut_1.name() + "_" + str(i + 1)
   for sub in range(0, BooleanResults[i].numberOfSubs()):
     refName = BooleanName + '_' + str(sub + 1)
     subResult = BooleanResults[i].subResult(sub)
index e1fa838ce1f22d8ca699eb89bacac53962687235..c9babd78e03e39da30f1398e6ea6ab7e35b41ed0 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()
@@ -38,7 +40,8 @@ SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_3.result())
 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_3.result(), SketchLine_1.result())
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3")])
+Face_1_objects = [model.selection("EDGE", "Sketch_1/SketchLine_1"), model.selection("EDGE", "Sketch_1/SketchLine_2"), model.selection("EDGE", "Sketch_1/SketchLine_3")]
+Face_1 = model.addFace(Part_1_doc, Face_1_objects)
 Face_1.result().setName("triangle")
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "triangle")], model.selection(), 10, 0)
 model.do()
index 9d083212ac0b10ffc8a3b44c1426e6ce6c3a8a94..bb15cbb73767e41d75971cd5a3fce2930e9838fb 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()
@@ -43,15 +45,15 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 50)
 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_2.result(), SketchLine_1.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 20, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 20, 0)
 Extrusion_1.result().setName("plate")
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), 0, 10, [model.selection("SOLID", "plate")])
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "plate/To_Face_1"))
-SketchCircle_1 = Sketch_2.addCircle(30, 35, 10)
-SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "plate/Generated_Face_4&plate/To_Face_1"), False)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "plate/To_Face"))
+SketchCircle_1 = Sketch_2.addCircle(30.00000000000001, 15, 10)
+SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "[plate/Generated_Face&Sketch_1/SketchLine_4][plate/To_Face]"), False)
 SketchLine_5 = SketchProjection_2.createdFeature()
 SketchConstraintDistance_1 = Sketch_2.setDistance(SketchCircle_1.center(), SketchLine_5.result(), 20, True)
-SketchProjection_3 = Sketch_2.addProjection(model.selection("EDGE", "plate/Generated_Face_1&plate/To_Face_1"), False)
+SketchProjection_3 = Sketch_2.addProjection(model.selection("EDGE", "[plate/Generated_Face&Sketch_1/SketchLine_1][plate/To_Face]"), False)
 SketchLine_6 = SketchProjection_3.createdFeature()
 SketchConstraintDistance_2 = Sketch_2.setDistance(SketchCircle_1.center(), SketchLine_6.result(), 15, True)
 SketchConstraintRadius_1 = Sketch_2.setRadius(SketchCircle_1.results()[1], 10)
index b20f90afb33e27b8efce697f33d1e0fd852cfaad..1b22fcb45f7a8322f57495ef1d2bbacb08017367 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()
@@ -29,7 +31,7 @@ Box_1.result().setName("box")
 Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "box/Front"))
 SketchCircle_1 = Sketch_1.addCircle(7, 6, 2)
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")])
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_1_2")])
 Face_1.result().setName("circle")
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "circle")], model.selection(), 0, 3, [model.selection("SOLID", "box")])
 model.do()
index 6e008eee728a37719d479851ecd117d9267cb6d4..ab19886dd5879bb55fcd7739abac546a1eb43ed9 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from salome.shaper import model
 from ModelAPI import *
 
@@ -29,15 +31,15 @@ Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
 Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
 Cylinder_1.result().setName("cylinder")
-MultiTranslation_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "cylinder/Face_1"), 10, NB_COPIES)
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "[cylinder/Face_1][weak_name_3]"), 10, NB_COPIES)
 model.do()
 
-TransResult = MultiTranslation_1.result()
+TransResult = LinearCopy_1.result()
 TransResultName = TransResult.name()
 assert(TransResultName == Cylinder_1.result().name()), "MultiTranslation name '{}' != '{}'".format(TransResultName, Cylinder_1.result().name())
 # check sub-result names
 assert(NB_COPIES == TransResult.numberOfSubs()), "Number of results {} is not equal to reference {}".format(TransResult.numberOfSubs(), NB_COPIES)
-MultiTranslationName = MultiTranslation_1.name() + "_1"
+MultiTranslationName = LinearCopy_1.name() + "_1"
 for i in range(0, NB_COPIES):
   refName = MultiTranslationName + '_' + str(i + 1)
   subResult = TransResult.subResult(i)
index ad2043f7f860a5283f896890ad27928609eac428..8081237904280d9dee043f721ee5facdd7b33e7d 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()
@@ -33,7 +35,7 @@ SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(),
 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_3.endPoint())
 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
 SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(SketchLine_2.result(), SketchLine_3.result())
-SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_3.result(), 30)
+SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_1.result(), SketchLine_3.result(), 30.00000000000014)
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 60)
 SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OY"), False)
 SketchLine_4 = SketchProjection_1.createdFeature()
@@ -42,11 +44,11 @@ SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_4.result(), SketchConst
 [SketchLine_5, SketchLine_6, SketchLine_7] = SketchConstraintMirror_1.mirrored()
 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_2.startPoint(), SketchLine_4.result(), 30, True)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f")], model.selection(), 20, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f")], model.selection(), 20, 0)
 Extrusion_1.result().setName("prism")
-Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0)
+Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_6r-SketchLine_7r-SketchLine_5r")], model.selection("EDGE", "Sketch_1/SketchLine_6"), 360, 0)
 Revolution_1.result().setName("spinner")
-Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_6&spinner/Base_Edge_10"), model.selection("FACE", "prism/Generated_Face_2"), False, True)
+Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "[spinner/Generated_Face&Sketch_1/SketchLine_7][spinner/Generated_Face&Sketch_1/SketchLine_5]"), model.selection("FACE", "prism/Generated_Face&Sketch_1/SketchLine_2"), False, True)
 model.do()
 
 assert(Placement_1.result().name() == Revolution_1.result().name()), "Placement name '{}' != '{}'".format(Placement_1.result().name(), Revolution_1.result().name())
index cb367867213ad562d58559b840a32554dd79d9cd..949be3febfa466986bad0f414990c47d8117b823 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()
@@ -41,7 +43,7 @@ SketchConstraintRigid_1 = Sketch_1.setFixed(SketchLine_1.startPoint())
 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 5)
 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_1.startPoint(), SketchLine_1.endPoint(), 8, True)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2f-SketchArc_2_2f")], model.selection(), 10, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2r-SketchArc_2_2f")], model.selection(), 10, 0)
 Extrusion_1.result().setName("prism")
 Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "prism"), model.selection("SOLID", "cylinder")], model.selection("EDGE", "PartSet/OX"), 30)
 model.do()
index bad08c5e7ad8232472c3bdfcc8f8630b68f8ffd4..383df810bf357b324f423ec5b27f5740d237f722 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()
@@ -26,7 +28,7 @@ Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
 Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
 Cylinder_1.result().setName("cylinder")
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "cylinder/Face_1"), 20)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "cylinder")], model.selection("EDGE", "[cylinder/Face_1][weak_name_3]"), 20)
 model.do()
 
 assert(Translation_1.result().name() == Cylinder_1.result().name()), "Translation name '{}' != '{}'".format(Translation_1.result().name(), Cylinder_1.result().name())
index 3e8b58b4e6cb7a605e86ded3be7ec7b47e9d9a36..f4c21551e9274d80db5df3a8d9a57dc9cc632ddb 100644 (file)
@@ -50,7 +50,7 @@ SketchLine_2 = SketchProjection_2.createdFeature()
 SketchConstraintDistance_2 = Sketch_2.setDistance(SketchLine_2.result(), SketchCircle_4.center(), 5, True)
 SketchConstraintDistanceHorizontal_1 = Sketch_2.setHorizontalDistance(SketchAPI_Line(SketchLine_2).startPoint(), SketchCircle_4.center(), 25)
 model.do()
-Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_4_2f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
+Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_4_2r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
 Cut_1 = model.addCut(Part_1_doc, [model.selection("COMPOUND", "all-in-Extrusion_1")], [model.selection("COMPOUND", "all-in-Revolution_1")])
 model.do()
 
index 3806afedd08cfd829d9f552da038b8c384ca402c..81386cd039b95d71d84283aca850579568a1b583 100644 (file)
@@ -18,7 +18,7 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
-__updated__ = "2018-01-16"
+# -*- coding: utf-8 -*-
 
 from salome.shaper import model
 
@@ -43,8 +43,8 @@ SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_1.result(), SketchL
 SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_4.result())
 SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(SketchLine_1.result(), SketchLine_4.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r")], model.selection(), 50, 0)
-Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1")], 2)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")], model.selection(), 50, 0)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4][Extrusion_1_1/To_Face]")], 2)
 model.do()
 
 Folder_1 = model.addFolder(Part_1_doc, Sketch_1, Extrusion_1)
index 62e1e96de2fb7e9483ef98cb9816796a2fe6519e..0b9ed954da3e0c7c5ef6f83010efe7a2e5c4c1fa 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from GeomAPI import *
 
 from salome.shaper import model
@@ -41,7 +43,7 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 10, 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 10, 0)
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), 5, 5, [model.selection("SOLID", "Extrusion_1_1")])
 Sketch_2_origin = GeomAPI_Pnt(0, -10, 0)
 Sketch_2_norm = GeomAPI_Dir(0, -1, 0)
@@ -60,20 +62,20 @@ SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_6.result())
 SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_7.result())
 SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_8.result())
 SketchConstraintLength_1 = Sketch_2.setLength(SketchLine_8.result(), "len")
-SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"), False)
+SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1/To_Face]"), False)
 SketchLine_9 = SketchProjection_1.createdFeature()
 SketchConstraintDistance_1 = Sketch_2.setDistance(SketchLine_5.startPoint(), SketchLine_9.result(), 20, True)
 ExtrusionCut_1.setNestedSketch(Sketch_2)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Cylinder_2 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_2&Extrusion_1_1/Generated_Face_3&ExtrusionCut_1_1/Modfied_1"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_1_1/Modified_Face&Extrusion_1_1/To_Face][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4]"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Cylinder_2 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][ExtrusionCut_1_1/Modified_Face&Extrusion_1_1/To_Face]"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
 model.do()
 # make sketch_2 cut the whole top face of the initial extrusion, so, one of the cylinder becomes invalid
 lenParam.setValue(100)
 Part_1_doc.setCurrentFeature(Cylinder_2.feature(), True)
 model.do()
 # update selection of cylinder base points
-model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&Extrusion_1_1/Generated_Face_3&ExtrusionCut_1_1/Modfied_1").fillAttribute(Cylinder_1.basePoint())
-model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_divided_1_1&Extrusion_1_1/Generated_Face_1").fillAttribute(Cylinder_2.basePoint())
+model.selection("VERTEX", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][ExtrusionCut_1_1/Modified_Face&Extrusion_1_1/To_Face&weak_name_1]").fillAttribute(Cylinder_1.basePoint())
+model.selection("VERTEX", "[ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchLine_1][ExtrusionCut_1_1/Modified_Face&Extrusion_1_1/To_Face&weak_name_2][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4]").fillAttribute(Cylinder_2.basePoint())
 model.end()
 
 # check that both cylinders are valid and have correct results
index e9ec85ba5c2891e8738df36b7ea2599e2f18cdc7..dadd65fa38c14c53ef697ffef2cd732798dd5425 100644 (file)
@@ -34,9 +34,9 @@ SketchCircle_2 = Sketch_1.addCircle(0, 0, 103.3027146966417)
 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_2.center())
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchCircle_2_2r")], model.selection(), 410, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
-SketchCircle_3 = Sketch_2.addCircle(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"))
-SketchCircle_4 = Sketch_2.addCircle(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face"))
+SketchCircle_3 = Sketch_2.addCircle(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchCircle_2_2][Extrusion_1_1/To_Face]"))
+SketchCircle_4 = Sketch_2.addCircle(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][Extrusion_1_1/To_Face]"))
 SketchArc_1 = Sketch_2.addArc(-76.31943784014528, 69.61892179185162, 22.73963059863011, 100.7688447087372, -98.26117835861398, -31.87776170424145, False)
 SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchCircle_3.results()[1], SketchArc_1.startPoint())
 SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchCircle_3.results()[1], SketchArc_1.endPoint())
@@ -48,13 +48,15 @@ SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchArc_1.startPoint(),
 SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchArc_1.results()[1], SketchArc_2.endPoint())
 model.do()
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_1_2f-SketchArc_2_2r")], model.selection(), model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchCircle_2_2r"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modified_Face&Extrusion_1_1/To_Face"))
 SketchLine_1 = Sketch_3.addLine(72.49453964599654, -117.643151959956, 76.08424302289386, 111.5797586569786)
 SketchArc_3 = Sketch_3.addArc(23.82028040531734, -147.9761102212422, 72.49453964599654, -117.643151959956, 29.20403695178628, -205.0750334594096, False)
 SketchConstraintCoincidence_9 = Sketch_3.setCoincident(SketchLine_1.startPoint(), SketchArc_3.startPoint())
-SketchProjection_1 = Sketch_3.addProjection(model.selection("EDGE", "ExtrusionCut_1_1", 13), False)
+SketchProjection_1 = Sketch_3.addProjection(model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Extrusion_1_1/To_Face][ExtrusionCut_1_1/Modified_Face&Sketch_1/SketchCircle_1_2&weak_name_2]"), False)
 SketchArc_4 = SketchProjection_1.createdFeature()
 SketchConstraintCoincidence_10 = Sketch_3.setCoincident(SketchArc_3.endPoint(), SketchArc_4.results()[1])
+model.do()
+model.do()
 model.end()
 
 from ModelAPI import *
index 1aa708b3fd467ed97e66e3533aec8161ed911942..631d33561148a99120f740320a3819832e3a51c9 100644 (file)
@@ -61,15 +61,15 @@ SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), "ep_base")
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_2.result(), 3.65)
 SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_3.result(), 4.65)
 SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_4.result(), 1.65)
-SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_7.startPoint(), SketchLine_3.result(), "ep_base")
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_7.startPoint(), SketchLine_3.result(), "ep_base", False)
 SketchLine_9 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OX"))
-SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_9.result(), "0.275+ep_voiles/2")
+SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_9.result(), "0.275+ep_voiles/2", False)
 SketchLine_10 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OY"))
-SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_2.startPoint(), SketchLine_10.result(), "0.325+ep_voiles/2")
+SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_2.startPoint(), SketchLine_10.result(), "0.325+ep_voiles/2", False)
 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_5.result(), SketchLine_1.result())
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f")], model.selection(), 0, 0.3)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/From_Face_1"))
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f")], model.selection(), 0, 0.3)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/From_Face"))
 SketchLine_11 = Sketch_2.addLine(2.26, -2.31, 1.64, -2.31)
 SketchLine_12 = Sketch_2.addLine(1.64, -2.31, 1.64, -1.69)
 SketchLine_13 = Sketch_2.addLine(1.64, -1.69, 2.26, -1.69)
@@ -86,21 +86,21 @@ SketchPoint_1 = Sketch_2.addPoint(1.925, -1.875)
 SketchConstraintLength_5 = Sketch_2.setLength(SketchLine_11.result(), 0.62)
 SketchConstraintLength_5.setName("SketchConstraintLength_10")
 SketchConstraintEqual_2 = Sketch_2.setEqual(SketchLine_11.result(), SketchLine_12.result())
-SketchConstraintDistance_4 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_13.result(), "0.11+ep_poteau/2")
+SketchConstraintDistance_4 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_13.result(), "0.11+ep_poteau/2", False)
 SketchConstraintDistance_4.setName("SketchConstraintDistance_6")
-SketchConstraintDistance_5 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_12.result(), "0.21+ep_poteau/2")
+SketchConstraintDistance_5 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_12.result(), "0.21+ep_poteau/2", False)
 SketchConstraintDistance_5.setName("SketchConstraintDistance_7")
-SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"))
+SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"), False)
 SketchLine_15 = SketchProjection_1.createdFeature()
-SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OY"))
+SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OY"), False)
 SketchLine_16 = SketchProjection_2.createdFeature()
-SketchConstraintDistance_6 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_15.result(), "1.75+ep_poteau/2+ep_voiles/2")
+SketchConstraintDistance_6 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_15.result(), "1.75+ep_poteau/2+ep_voiles/2", False)
 SketchConstraintDistance_6.setName("SketchConstraintDistance_8")
-SketchConstraintDistance_7 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_16.result(), "1.8+ep_poteau/2+ep_voiles/2")
+SketchConstraintDistance_7 = Sketch_2.setDistance(SketchPoint_1.coordinates(), SketchLine_16.result(), "1.8+ep_poteau/2+ep_voiles/2", False)
 SketchConstraintDistance_7.setName("SketchConstraintDistance_9")
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_11r-SketchLine_12r-SketchLine_13r-SketchLine_14r")], model.selection(), 0, 0.02)
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f"))
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_14r-SketchLine_13r-SketchLine_12r-SketchLine_11r")], model.selection(), 0, 0.02)
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f"))
 SketchLine_17 = Sketch_3.addLine(0, 2.950000000000001, 0, 1.700000000000001)
 SketchLine_17.setName("SketchLine_15")
 SketchLine_17.result().setName("SketchLine_15")
@@ -120,24 +120,22 @@ SketchLine_20.result().setName("SketchLine_18")
 SketchLine_21 = Sketch_3.addLine(model.selection("EDGE", "PartSet/OX"))
 SketchLine_21.setName("SketchLine_19")
 SketchLine_21.result().setName("SketchLine_19")
-#SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_20.startPoint(), SketchLine_21.result())
-#SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchLine_20.endPoint(), SketchLine_21.result())
 SketchLine_22 = Sketch_3.addLine(2.525000000000001, 0, 3.975000000000001, 0)
 SketchLine_22.setName("SketchLine_20")
 SketchLine_22.result().setName("SketchLine_20")
-SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchLine_21.result())
-SketchConstraintCoincidence_20 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_21.result())
+SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchLine_21.result())
+SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_21.result())
 SketchLine_23 = Sketch_3.addLine(3.975000000000001, 0, 3.975000000000001, 0.95)
 SketchLine_23.setName("SketchLine_21")
 SketchLine_23.result().setName("SketchLine_21")
-SketchConstraintCoincidence_21 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
-SketchLine_24 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"))
+SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
+SketchLine_24 = Sketch_3.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_5][Extrusion_1_1/To_Face]"))
 SketchLine_24.setName("SketchLine_22")
 SketchLine_24.result().setName("SketchLine_22")
 SketchConstraintLength_6 = Sketch_3.setLength(SketchLine_17.result(), 1.25)
 SketchConstraintLength_6.setName("SketchConstraintLength_5")
-SketchConstraintCoincidence_22 = Sketch_3.setCoincident(SketchLine_19.endPoint(), SketchLine_18.startPoint())
-SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchLine_20.startPoint(), SketchLine_19.endPoint())
+SketchConstraintCoincidence_20 = Sketch_3.setCoincident(SketchLine_19.endPoint(), SketchLine_18.startPoint())
+SketchConstraintCoincidence_21 = Sketch_3.setCoincident(SketchLine_20.startPoint(), SketchLine_19.endPoint())
 SketchConstraintLength_7 = Sketch_3.setLength(SketchLine_19.result(), "1.25-ep_voiles/2")
 SketchConstraintLength_7.setName("SketchConstraintLength_6")
 SketchConstraintLength_8 = Sketch_3.setLength(SketchLine_20.result(), "1-ep_voiles/2")
@@ -145,99 +143,108 @@ SketchConstraintLength_8.setName("SketchConstraintLength_7")
 SketchConstraintLength_9 = Sketch_3.setLength(SketchLine_22.result(), "1.5-ep_voiles/2")
 SketchConstraintLength_9.setName("SketchConstraintLength_8")
 SketchConstraintVertical_7 = Sketch_3.setVertical(SketchLine_23.result())
-SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"))
+SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "Sketch_1/SketchLine_4"))
 SketchLine_25.setName("SketchLine_23")
 SketchLine_25.result().setName("SketchLine_23")
-SketchConstraintDistance_8 = Sketch_3.setDistance(SketchLine_22.endPoint(), SketchLine_25.result(), "0.25+ep_voiles/2")
+SketchConstraintDistance_8 = Sketch_3.setDistance(SketchLine_22.endPoint(), SketchLine_25.result(), "0.25+ep_voiles/2", False)
 SketchConstraintDistance_8.setName("SketchConstraintDistance_5")
 SketchConstraintLength_10 = Sketch_3.setLength(SketchLine_23.result(), "1-ep_voiles/2")
 SketchConstraintLength_10.setName("SketchConstraintLength_9")
-SketchLine_26 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"))
+SketchLine_26 = Sketch_3.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1/To_Face]"))
 SketchLine_26.setName("SketchLine_35")
 SketchLine_26.result().setName("SketchLine_35")
-SketchConstraintDistance_9 = Sketch_3.setDistance(SketchLine_17.startPoint(), SketchLine_26.result(), 0.375)
+SketchConstraintDistance_9 = Sketch_3.setDistance(SketchLine_17.startPoint(), SketchLine_26.result(), 0.375, False)
 SketchConstraintDistance_9.setName("SketchConstraintDistance_12")
 model.do()
-Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_3/Edge-SketchLine_15"), model.selection("EDGE", "Sketch_3/Edge-SketchLine_17"), model.selection("EDGE", "Sketch_3/Edge-SketchLine_18"), model.selection("EDGE", "Sketch_3/Edge-SketchLine_20"), model.selection("EDGE", "Sketch_3/Edge-SketchLine_21")])
-Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2"), model.selection("EDGE", "Edge_1_3"), model.selection("EDGE", "Edge_1_4"), model.selection("EDGE", "Edge_1_5")], model.selection("EDGE", "PartSet/OZ"), "h_ouverture", 0)
-Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "Extrusion_3_1/Generated_Edge_2&Extrusion_3_1/To_Edge_1"), model.selection("VERTEX", "Extrusion_3_3/Generated_Edge_2&Extrusion_3_3/To_Edge_1"), model.selection("VERTEX", "Extrusion_3_4/Generated_Edge_1&Extrusion_3_4/To_Edge_1"))
+Edge_1_objects = [model.selection("EDGE", "Sketch_3/SketchLine_15"), model.selection("EDGE", "Sketch_3/SketchLine_17"), model.selection("EDGE", "Sketch_3/SketchLine_18"), model.selection("EDGE", "Sketch_3/SketchLine_20"), model.selection("EDGE", "Sketch_3/SketchLine_21")]
+Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects)
+Extrusion_3_objects = [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2"), model.selection("EDGE", "Edge_1_3"), model.selection("EDGE", "Edge_1_4"), model.selection("EDGE", "Edge_1_5")]
+Extrusion_3 = model.addExtrusion(Part_1_doc, Extrusion_3_objects, model.selection("EDGE", "PartSet/OZ"), "h_ouverture", 0)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[Extrusion_3_1/Generated_Edge&Sketch_3/SketchLine_17_StartVertex]e[Extrusion_3_1/To_Edge]e"), model.selection("VERTEX", "[Extrusion_3_3/Generated_Edge&Sketch_3/SketchLine_20_StartVertex]e[Extrusion_3_3/To_Edge]e"), model.selection("VERTEX", "[Extrusion_3_4/Generated_Edge&Sketch_3/SketchLine_22_EndVertex]e[Extrusion_3_4/To_Edge]e"))
 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchLine_27 = Sketch_4.addLine(0, 2.950000000000001, 0, 0)
 SketchLine_27.setName("SketchLine_26")
 SketchLine_27.result().setName("SketchLine_26")
-SketchPoint_2 = Sketch_4.addPoint(model.selection("VERTEX", "Extrusion_3_1/Generated_Edge_2&Extrusion_3_1/To_Edge_1"))
-SketchConstraintCoincidence_24 = Sketch_4.setCoincident(SketchLine_27.startPoint(), SketchPoint_2.result())
-SketchPoint_3 = Sketch_4.addPoint(model.selection("VERTEX", "Extrusion_3_3/Generated_Edge_2&Extrusion_3_3/To_Edge_1"))
-SketchConstraintCoincidence_25 = Sketch_4.setCoincident(SketchLine_27.endPoint(), SketchPoint_3.result())
+SketchPoint_2 = Sketch_4.addPoint(model.selection("VERTEX", "[Extrusion_3_1/Generated_Edge&Sketch_3/SketchLine_17_StartVertex]e[Extrusion_3_1/To_Edge]e"))
+SketchConstraintCoincidence_22 = Sketch_4.setCoincident(SketchLine_27.startPoint(), SketchPoint_2.result())
+SketchPoint_3 = Sketch_4.addPoint(model.selection("VERTEX", "[Extrusion_3_3/Generated_Edge&Sketch_3/SketchLine_20_StartVertex]e[Extrusion_3_3/To_Edge]e"))
+SketchConstraintCoincidence_23 = Sketch_4.setCoincident(SketchLine_27.endPoint(), SketchPoint_3.result())
 SketchLine_28 = Sketch_4.addLine(0, 0, 3.975000000000001, 0)
 SketchLine_28.setName("SketchLine_27")
 SketchLine_28.result().setName("SketchLine_27")
-SketchConstraintCoincidence_26 = Sketch_4.setCoincident(SketchLine_27.endPoint(), SketchLine_28.startPoint())
-SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "Extrusion_3_4/Generated_Edge_1&Extrusion_3_4/To_Edge_1"))
-SketchConstraintCoincidence_27 = Sketch_4.setCoincident(SketchLine_28.endPoint(), SketchPoint_4.result())
+SketchConstraintCoincidence_24 = Sketch_4.setCoincident(SketchLine_27.endPoint(), SketchLine_28.startPoint())
+SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "[Extrusion_3_4/Generated_Edge&Sketch_3/SketchLine_22_EndVertex]e[Extrusion_3_4/To_Edge]e"))
+SketchConstraintCoincidence_25 = Sketch_4.setCoincident(SketchLine_28.endPoint(), SketchPoint_4.result())
 SketchLine_29 = Sketch_4.addLine(3.975000000000001, 0, 3.975000000000001, 0.95)
 SketchLine_29.setName("SketchLine_28")
 SketchLine_29.result().setName("SketchLine_28")
-SketchConstraintCoincidence_28 = Sketch_4.setCoincident(SketchLine_28.endPoint(), SketchLine_29.startPoint())
-SketchPoint_5 = Sketch_4.addPoint(model.selection("VERTEX", "Extrusion_3_5/Generated_Edge_1&Extrusion_3_5/To_Edge_1"))
-SketchConstraintCoincidence_29 = Sketch_4.setCoincident(SketchLine_29.endPoint(), SketchPoint_5.result())
+SketchConstraintCoincidence_26 = Sketch_4.setCoincident(SketchLine_28.endPoint(), SketchLine_29.startPoint())
+SketchPoint_5 = Sketch_4.addPoint(model.selection("VERTEX", "[Extrusion_3_5/Generated_Edge&Sketch_3/SketchLine_23_EndVertex]e[Extrusion_3_5/To_Edge]e"))
+SketchConstraintCoincidence_27 = Sketch_4.setCoincident(SketchLine_29.endPoint(), SketchPoint_5.result())
 model.do()
-Edge_2 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_4/Edge-SketchLine_26"), model.selection("EDGE", "Sketch_4/Edge-SketchLine_27"), model.selection("EDGE", "Sketch_4/Edge-SketchLine_28")])
-Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("EDGE", "Edge_2_1"), model.selection("EDGE", "Edge_2_2"), model.selection("EDGE", "Edge_2_3")], model.selection("EDGE", "PartSet/OZ"), "h_apres_ouverture-ep_dalles/2", 0)
-Plane_5 = model.addPlane(Part_1_doc, model.selection("VERTEX", "Extrusion_4_1/Generated_Edge_2&Extrusion_4_1/To_Edge_1"), model.selection("VERTEX", "Extrusion_4_1/Generated_Edge_1&Extrusion_4_1/To_Edge_1"), model.selection("VERTEX", "Extrusion_4_2/Generated_Edge_1&Extrusion_4_2/To_Edge_1"))
+Edge_2_objects = [model.selection("EDGE", "Sketch_4/SketchLine_26"), model.selection("EDGE", "Sketch_4/SketchLine_27"), model.selection("EDGE", "Sketch_4/SketchLine_28")]
+Edge_2 = model.addEdge(Part_1_doc, Edge_2_objects)
+Extrusion_4_objects = [model.selection("EDGE", "Edge_2_1"), model.selection("EDGE", "Edge_2_2"), model.selection("EDGE", "Edge_2_3")]
+Extrusion_4 = model.addExtrusion(Part_1_doc, Extrusion_4_objects, model.selection("EDGE", "PartSet/OZ"), "h_apres_ouverture-ep_dalles/2", 0)
+Plane_5 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[Extrusion_4_1/Generated_Edge&Sketch_4/SketchLine_27_StartVertex]e[Extrusion_4_1/To_Edge]e"), model.selection("VERTEX", "[Extrusion_4_1/Generated_Edge&Sketch_4/SketchLine_27_EndVertex]e[Extrusion_4_1/To_Edge]e"), model.selection("VERTEX", "[Extrusion_4_2/Generated_Edge&Sketch_4/SketchLine_28_EndVertex]e[Extrusion_4_2/To_Edge]e"))
 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
 SketchLine_30 = Sketch_5.addLine(0, 2.950000000000001, 0, 0)
 SketchLine_30.setName("SketchLine_29")
 SketchLine_30.result().setName("SketchLine_29")
-SketchPoint_6 = Sketch_5.addPoint(model.selection("VERTEX", "Extrusion_4_1/Generated_Edge_2&Extrusion_4_1/To_Edge_1"))
-SketchConstraintCoincidence_30 = Sketch_5.setCoincident(SketchLine_30.startPoint(), SketchPoint_6.result())
-SketchPoint_7 = Sketch_5.addPoint(model.selection("VERTEX", "Extrusion_4_1/Generated_Edge_1&Extrusion_4_1/To_Edge_1"))
-SketchConstraintCoincidence_31 = Sketch_5.setCoincident(SketchLine_30.endPoint(), SketchPoint_7.result())
+SketchPoint_6 = Sketch_5.addPoint(model.selection("VERTEX", "[Extrusion_4_1/Generated_Edge&Sketch_4/SketchLine_27_StartVertex]e[Extrusion_4_1/To_Edge]e"))
+SketchConstraintCoincidence_28 = Sketch_5.setCoincident(SketchLine_30.startPoint(), SketchPoint_6.result())
+SketchPoint_7 = Sketch_5.addPoint(model.selection("VERTEX", "[Extrusion_4_1/Generated_Edge&Sketch_4/SketchLine_27_EndVertex]e[Extrusion_4_1/To_Edge]e"))
+SketchConstraintCoincidence_29 = Sketch_5.setCoincident(SketchLine_30.endPoint(), SketchPoint_7.result())
 SketchLine_31 = Sketch_5.addLine(0, 0, 3.975000000000001, 0)
 SketchLine_31.setName("SketchLine_30")
 SketchLine_31.result().setName("SketchLine_30")
-SketchConstraintCoincidence_32 = Sketch_5.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
-SketchPoint_8 = Sketch_5.addPoint(model.selection("VERTEX", "Extrusion_4_2/Generated_Edge_1&Extrusion_4_2/To_Edge_1"))
-SketchConstraintCoincidence_33 = Sketch_5.setCoincident(SketchLine_31.endPoint(), SketchPoint_8.result())
+SketchConstraintCoincidence_30 = Sketch_5.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
+SketchPoint_8 = Sketch_5.addPoint(model.selection("VERTEX", "[Extrusion_4_2/Generated_Edge&Sketch_4/SketchLine_28_EndVertex]e[Extrusion_4_2/To_Edge]e"))
+SketchConstraintCoincidence_31 = Sketch_5.setCoincident(SketchLine_31.endPoint(), SketchPoint_8.result())
 SketchLine_32 = Sketch_5.addLine(3.975000000000001, 0, 3.975000000000001, 0.95)
 SketchLine_32.setName("SketchLine_31")
 SketchLine_32.result().setName("SketchLine_31")
-SketchConstraintCoincidence_34 = Sketch_5.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
-SketchPoint_9 = Sketch_5.addPoint(model.selection("VERTEX", "Extrusion_4_3/Generated_Edge_1&Extrusion_4_3/To_Edge_1"))
-SketchConstraintCoincidence_35 = Sketch_5.setCoincident(SketchLine_32.endPoint(), SketchPoint_9.result())
+SketchConstraintCoincidence_32 = Sketch_5.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
+SketchPoint_9 = Sketch_5.addPoint(model.selection("VERTEX", "[Extrusion_4_3/Generated_Edge&Sketch_4/SketchLine_29_EndVertex]e[Extrusion_4_3/To_Edge]e"))
+SketchConstraintCoincidence_33 = Sketch_5.setCoincident(SketchLine_32.endPoint(), SketchPoint_9.result())
 SketchLine_33 = Sketch_5.addLine(3.975000000000001, 0.95, 0, 2.950000000000001)
 SketchLine_33.setName("SketchLine_32")
 SketchLine_33.result().setName("SketchLine_32")
-SketchConstraintCoincidence_36 = Sketch_5.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
-SketchConstraintCoincidence_37 = Sketch_5.setCoincident(SketchLine_30.startPoint(), SketchLine_33.endPoint())
-SketchConstraintCoincidence_38 = Sketch_5.setCoincident(SketchPoint_6.coordinates(), SketchLine_33.endPoint())
+SketchConstraintCoincidence_34 = Sketch_5.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
+SketchConstraintCoincidence_35 = Sketch_5.setCoincident(SketchLine_30.startPoint(), SketchLine_33.endPoint())
+SketchConstraintCoincidence_36 = Sketch_5.setCoincident(SketchPoint_6.coordinates(), SketchLine_33.endPoint())
 SketchLine_34 = Sketch_5.addLine(1.85, 2.019182389937107, 1.85, 0)
 SketchLine_34.setName("SketchLine_33")
 SketchLine_34.result().setName("SketchLine_33")
-SketchConstraintCoincidence_39 = Sketch_5.setCoincident(SketchLine_34.startPoint(), SketchLine_33.result())
+SketchConstraintCoincidence_37 = Sketch_5.setCoincident(SketchLine_34.startPoint(), SketchLine_33.result())
 SketchLine_35 = Sketch_5.addLine(2.075000000000001, 1.905974842767296, 2.075000000000001, 0)
 SketchLine_35.setName("SketchLine_34")
 SketchLine_35.result().setName("SketchLine_34")
-SketchConstraintCoincidence_40 = Sketch_5.setCoincident(SketchLine_35.startPoint(), SketchLine_33.result())
-SketchConstraintCoincidence_41 = Sketch_5.setCoincident(SketchLine_35.endPoint(), SketchLine_31.result())
-SketchConstraintCoincidence_42 = Sketch_5.setCoincident(SketchLine_34.endPoint(), SketchLine_31.result())
+SketchConstraintCoincidence_38 = Sketch_5.setCoincident(SketchLine_35.startPoint(), SketchLine_33.result())
+SketchConstraintCoincidence_39 = Sketch_5.setCoincident(SketchLine_35.endPoint(), SketchLine_31.result())
+SketchConstraintCoincidence_40 = Sketch_5.setCoincident(SketchLine_34.endPoint(), SketchLine_31.result())
 SketchConstraintVertical_8 = Sketch_5.setVertical(SketchLine_34.result())
 SketchConstraintVertical_9 = Sketch_5.setVertical(SketchLine_35.result())
-SketchConstraintDistance_10 = Sketch_5.setDistance(SketchLine_34.startPoint(), SketchLine_30.result(), "1.8+ep_voiles/2")
-SketchConstraintDistance_11 = Sketch_5.setDistance(SketchLine_35.startPoint(), SketchLine_32.result(), "1.85+ep_voiles/2")
+SketchConstraintDistance_10 = Sketch_5.setDistance(SketchLine_34.startPoint(), SketchLine_30.result(), "1.8+ep_voiles/2", False)
+SketchConstraintDistance_10.setName("SketchConstraintDistance_10")
+SketchConstraintDistance_11 = Sketch_5.setDistance(SketchLine_35.startPoint(), SketchLine_32.result(), "1.85+ep_voiles/2", False)
+SketchConstraintDistance_11.setName("SketchConstraintDistance_11")
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_5/Wire-SketchLine_29f-SketchLine_30f-SketchLine_32f-SketchLine_33r")])
-Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_5/Wire-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_34f")])
-Face_3 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_5/Wire-SketchLine_30f-SketchLine_32f-SketchLine_33f-SketchLine_34r")])
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Extrusion_4_3"), model.selection("FACE", "Extrusion_3_3"), model.selection("FACE", "Extrusion_4_2"), model.selection("FACE", "Extrusion_3_5"), model.selection("FACE", "Extrusion_3_4"), model.selection("FACE", "Extrusion_3_2"), model.selection("FACE", "Extrusion_4_1"), model.selection("FACE", "Extrusion_3_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_2_1")], model.selection("EDGE", "PartSet/OZ"), "h_ouverture+h_apres_ouverture-ep_dalles/2")
+Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_5/Face-SketchLine_29r-SketchLine_30f-SketchLine_33r-SketchLine_32f_wire")])
+Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_5/Face-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_34f_wire")])
+Face_3 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_5/Face-SketchLine_30f-SketchLine_34r-SketchLine_32f-SketchLine_33f_wire")])
+Translation_1_objects = [model.selection("FACE", "Extrusion_4_3"), model.selection("FACE", "Extrusion_3_3"), model.selection("FACE", "Extrusion_4_2"), model.selection("FACE", "Extrusion_3_5"), model.selection("FACE", "Extrusion_3_4"), model.selection("FACE", "Extrusion_3_2"), model.selection("FACE", "Extrusion_4_1"), model.selection("FACE", "Extrusion_3_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_2_1")]
+Translation_1 = model.addTranslation(Part_1_doc, Translation_1_objects, model.selection("EDGE", "PartSet/OZ"), "h_ouverture+h_apres_ouverture-ep_dalles/2")
 Recover_1_objects = [Face_2.result(), Face_3.result(), Face_1.result(), Extrusion_3.result(), Extrusion_4.result(), Extrusion_3.results()[1], Extrusion_3.results()[3], Extrusion_3.results()[4], Extrusion_4.results()[1], Extrusion_3.results()[2], Extrusion_4.results()[2]]
 Recover_1 = model.addRecover(Part_1_doc, Translation_1, Recover_1_objects)
-Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_2"), model.selection("FACE", "Recover_1_5"), model.selection("FACE", "Recover_1_3"), model.selection("FACE", "Recover_1_4"), model.selection("FACE", "Recover_1_1"), model.selection("FACE", "Recover_1_6"), model.selection("FACE", "Recover_1_8"), model.selection("FACE", "Recover_1_7"), model.selection("FACE", "Recover_1_11"), model.selection("FACE", "Recover_1_10"), model.selection("FACE", "Recover_1_9")], model.selection("EDGE", "PartSet/OZ"), "2*(h_ouverture+h_apres_ouverture-ep_dalles/2)")
+Translation_2_objects = [model.selection("FACE", "Recover_1_2"), model.selection("FACE", "Recover_1_5"), model.selection("FACE", "Recover_1_3"), model.selection("FACE", "Recover_1_4"), model.selection("FACE", "Recover_1_1"), model.selection("FACE", "Recover_1_6"), model.selection("FACE", "Recover_1_8"), model.selection("FACE", "Recover_1_7"), model.selection("FACE", "Recover_1_11"), model.selection("FACE", "Recover_1_10"), model.selection("FACE", "Recover_1_9")]
+Translation_2 = model.addTranslation(Part_1_doc, Translation_2_objects, model.selection("EDGE", "PartSet/OZ"), "2*(h_ouverture+h_apres_ouverture-ep_dalles/2)")
 Recover_2_objects = [Recover_1.results()[8], Recover_1.results()[9], Recover_1.results()[10], Recover_1.results()[6], Recover_1.results()[7], Recover_1.results()[5], Recover_1.result(), Recover_1.results()[3], Recover_1.results()[2], Recover_1.results()[4], Recover_1.results()[1]]
 Recover_2 = model.addRecover(Part_1_doc, Translation_2, Recover_2_objects)
-Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_2/Vertex-SketchPoint_1")])
+Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Sketch_2/SketchPoint_1")])
 Extrusion_5 = model.addExtrusion(Part_1_doc, [model.selection("VERTEX", "Vertex_1_1")], model.selection("EDGE", "PartSet/OZ"), model.selection("FACE", "Translation_2_11"), 0, model.selection(), 0)
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1"), model.selection("FACE", "Translation_1_1"), model.selection("FACE", "Translation_1_2"), model.selection("FACE", "Translation_1_3"), model.selection("FACE", "Translation_1_4"), model.selection("FACE", "Translation_1_5"), model.selection("FACE", "Translation_1_6"), model.selection("FACE", "Translation_1_7"), model.selection("FACE", "Translation_1_8"), model.selection("FACE", "Translation_1_9"), model.selection("FACE", "Translation_1_10"), model.selection("FACE", "Translation_1_11"), model.selection("FACE", "Translation_2_1"), model.selection("FACE", "Translation_2_2"), model.selection("FACE", "Translation_2_3"), model.selection("FACE", "Translation_2_4"), model.selection("FACE", "Translation_2_5"), model.selection("FACE", "Translation_2_6"), model.selection("FACE", "Translation_2_7"), model.selection("FACE", "Translation_2_8"), model.selection("FACE", "Translation_2_9"), model.selection("FACE", "Translation_2_10"), model.selection("FACE", "Translation_2_11"), model.selection("FACE", "Recover_2_1"), model.selection("FACE", "Recover_2_2"), model.selection("FACE", "Recover_2_3"), model.selection("FACE", "Recover_2_4"), model.selection("FACE", "Recover_2_5"), model.selection("FACE", "Recover_2_6"), model.selection("FACE", "Recover_2_7"), model.selection("FACE", "Recover_2_8"), model.selection("FACE", "Recover_2_9"), model.selection("FACE", "Recover_2_10"), model.selection("FACE", "Recover_2_11"), model.selection("EDGE", "Extrusion_5_1")])
+Partition_1_objects = [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1"), model.selection("FACE", "Translation_1_1"), model.selection("FACE", "Translation_1_2"), model.selection("FACE", "Translation_1_3"), model.selection("FACE", "Translation_1_4"), model.selection("FACE", "Translation_1_5"), model.selection("FACE", "Translation_1_6"), model.selection("FACE", "Translation_1_7"), model.selection("FACE", "Translation_1_8"), model.selection("FACE", "Translation_1_9"), model.selection("FACE", "Translation_1_10"), model.selection("FACE", "Translation_1_11"), model.selection("FACE", "Translation_2_1"), model.selection("FACE", "Translation_2_2"), model.selection("FACE", "Translation_2_3"), model.selection("FACE", "Translation_2_4"), model.selection("FACE", "Translation_2_5"), model.selection("FACE", "Translation_2_6"), model.selection("FACE", "Translation_2_7"), model.selection("FACE", "Translation_2_8"), model.selection("FACE", "Translation_2_9"), model.selection("FACE", "Translation_2_10"), model.selection("FACE", "Translation_2_11"), model.selection("FACE", "Recover_2_1"), model.selection("FACE", "Recover_2_2"), model.selection("FACE", "Recover_2_3"), model.selection("FACE", "Recover_2_4"), model.selection("FACE", "Recover_2_5"), model.selection("FACE", "Recover_2_6"), model.selection("FACE", "Recover_2_7"), model.selection("FACE", "Recover_2_8"), model.selection("FACE", "Recover_2_9"), model.selection("FACE", "Recover_2_10"), model.selection("FACE", "Recover_2_11"), model.selection("EDGE", "Extrusion_5_1")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
 model.do()
 model.testHaveNamingSubshapes(Partition_1, model, Part_1_doc)
 model.end()
index 0113da48ab38c2880bbbdb2a4630a25c0c06e5a2..bd4f577e69c371038d296f96a6679f886b007772 100644 (file)
@@ -18,6 +18,8 @@
 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 ##
 
+# -*- coding: utf-8 -*-
+
 from SketchAPI import *
 
 from salome.shaper import model
@@ -56,9 +58,9 @@ SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_5.result(), 2)
 SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_3.result(), 1.5)
 SketchConstraintLength_5 = Sketch_1.setLength(SketchLine_8.result(), 4)
 model.do()
-Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_7r-SketchLine_8f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_1"))
-SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1__cc"), False)
+Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_8f-SketchLine_7r-SketchLine_5r-SketchLine_4r-SketchLine_3r-SketchLine_1r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1"))
+SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Sketch_1/SketchLine_3][Revolution_1_1/Generated_Face&Sketch_1/SketchLine_1]__cc"), False)
 SketchPoint_1 = SketchProjection_3.createdFeature()
 SketchCircle_1 = Sketch_2.addCircle(0, 0, 4.75)
 SketchCircle_1.setAuxiliary(True)
@@ -67,7 +69,7 @@ SketchCircle_2 = Sketch_2.addCircle(4.113620667976081, 2.375000000000003, 1.1)
 SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchCircle_1.results()[1], SketchCircle_2.center())
 SketchCircle_3 = Sketch_2.addCircle(-4.113620667974014, 2.375000000003604, 1.1)
 SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchCircle_1.results()[1], SketchCircle_3.center())
-SketchCircle_4 = Sketch_2.addCircle(4.163806340121522e-012, -4.75000000000001, 1.1)
+SketchCircle_4 = Sketch_2.addCircle(4.163806340121522e-12, -4.75000000000001, 1.1)
 SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchCircle_1.results()[1], SketchCircle_4.center())
 SketchConstraintEqual_1 = Sketch_2.setEqual(SketchCircle_2.results()[1], SketchCircle_3.results()[1])
 SketchConstraintEqual_2 = Sketch_2.setEqual(SketchCircle_3.results()[1], SketchCircle_4.results()[1])
@@ -79,12 +81,12 @@ SketchLine_10 = Sketch_2.addLine(-4.113620667974014, 2.375000000003604, 0, 0)
 SketchLine_10.setAuxiliary(True)
 SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchCircle_3.center(), SketchLine_10.startPoint())
 SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_10.endPoint())
-SketchLine_11 = Sketch_2.addLine(4.163806340121522e-012, -4.75000000000001, 0, 0)
+SketchLine_11 = Sketch_2.addLine(4.163806340121522e-12, -4.75000000000001, 0, 0)
 SketchLine_11.setAuxiliary(True)
 SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchCircle_4.center(), SketchLine_11.startPoint())
 SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_11.endPoint())
 SketchConstraintRadius_1 = Sketch_2.setRadius(SketchCircle_2.results()[1], 1.1)
-SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), False)
+SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_1"), False)
 SketchLine_12 = SketchProjection_4.createdFeature()
 SketchConstraintAngle_1 = Sketch_2.setAngleBackward(SketchLine_9.result(), SketchLine_12.result(), 30.00000000000006)
 SketchConstraintAngle_2 = Sketch_2.setAngle(SketchLine_9.result(), SketchLine_10.result(), 119.9999999999498)
@@ -173,39 +175,39 @@ SketchConstraintDistance_2 = Sketch_2.setDistance(SketchCircle_16.center(), Sket
 SketchConstraintDistance_3 = Sketch_2.setDistance(SketchAPI_Line(SketchLine_19).startPoint(), SketchCircle_17.center(), 5.2, True)
 model.do()
 ExtrusionCut_1_objects_1 = [model.selection("FACE", "Sketch_2/Face-SketchCircle_9_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_5_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_2_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_7_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_17_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_16_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_4_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_3_2f")]
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_1_objects_1, model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
-ExtrusionCut_2_objects_1 = [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_11_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_12_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_6_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchCircle_8_2f")]
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_1_objects_1, model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
+ExtrusionCut_2_objects_1 = [model.selection("WIRE", "Sketch_2/Face-SketchCircle_11_2f-SketchCircle_9_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_12_2f-SketchCircle_10_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_6_2f-SketchCircle_5_2r_wire"), model.selection("WIRE", "Sketch_2/Face-SketchCircle_8_2f-SketchCircle_7_2r_wire")]
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_2_objects_1, model.selection(), 0, 0.75, [model.selection("SOLID", "ExtrusionCut_1_1")])
 Axis_4 = model.addAxis(Part_1_doc, 0, -1, -10)
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_15_2f")], model.selection("EDGE", "Axis_1"), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
-ExtrusionCut_3.result().setDeflection(1e-005)
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_15_2f")], model.selection("EDGE", "Axis_1"), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
+ExtrusionCut_3.result().setDeflection(1e-05)
 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
 SketchLine_21 = Sketch_3.addLine(3.5, 2.508501119175777, 3.5, 4.934853156880259)
 SketchLine_22 = Sketch_3.addLine(3.5, 4.934853156880259, 6.2, 4.934853156880259)
 SketchConstraintCoincidence_49 = Sketch_3.setCoincident(SketchLine_21.endPoint(), SketchLine_22.startPoint())
 SketchLine_23 = Sketch_3.addLine(6.2, 4.934853156880259, 6.2, 3.008501119175777)
 SketchConstraintCoincidence_50 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
-SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), False)
+SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_3"), False)
 SketchLine_24 = SketchProjection_6.createdFeature()
 SketchConstraintCoincidence_51 = Sketch_3.setCoincident(SketchLine_23.endPoint(), SketchLine_24.result())
 SketchLine_25 = Sketch_3.addLine(6.2, 3.008501119175777, 3.5, 2.508501119175777)
 SketchConstraintCoincidence_52 = Sketch_3.setCoincident(SketchLine_23.endPoint(), SketchLine_25.startPoint())
 SketchConstraintCoincidence_53 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_25.endPoint())
-SketchProjection_7 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), False)
+SketchProjection_7 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_5"), False)
 SketchLine_26 = SketchProjection_7.createdFeature()
 SketchConstraintCoincidence_54 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_26.result())
 SketchConstraintCoincidence_55 = Sketch_3.setCoincident(SketchLine_21.endPoint(), SketchLine_26.result())
 SketchConstraintHorizontal_2 = Sketch_3.setHorizontal(SketchLine_22.result())
 SketchConstraintCoincidence_56 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_24.result())
-SketchProjection_8 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), False)
+SketchProjection_8 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_4"), False)
 SketchLine_27 = SketchProjection_8.createdFeature()
 SketchConstraintParallel_1 = Sketch_3.setParallel(SketchLine_25.result(), SketchLine_27.result())
-SketchProjection_9 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), False)
+SketchProjection_9 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_4"), False)
 SketchLine_28 = SketchProjection_9.createdFeature()
 SketchConstraintDistance_4 = Sketch_3.setDistance(SketchLine_21.startPoint(), SketchLine_28.result(), 0.5, True)
 model.do()
 Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "Sketch_3")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_13_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_14_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_13_2f"), model.selection("FACE", "Sketch_2/Face-SketchCircle_14_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face&Sketch_1/SketchLine_7"), 0, model.selection(), 0)
 Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
 Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_3_1")], [model.selection("SOLID", "Common_1_1"), model.selection("SOLID", "Common_1_2")])
 model.do()