From: azv Date: Thu, 28 Feb 2019 04:53:46 +0000 (+0300) Subject: Update unit-tests according to changing of the face modification history X-Git-Tag: HighLevelObjectsHierarchy~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e09c28fa209e3bcca25543e8f6341d77aaf749d8;p=modules%2Fshaper.git Update unit-tests according to changing of the face modification history --- diff --git a/src/BuildPlugin/Test/Test1920.py b/src/BuildPlugin/Test/Test1920.py index 416942064..4c1728cca 100644 --- a/src/BuildPlugin/Test/Test1920.py +++ b/src/BuildPlugin/Test/Test1920.py @@ -43,7 +43,7 @@ model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_5r-SketchLine_1r_wire")]) Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_5f-SketchLine_3r-SketchLine_2r-SketchLine_1r_wire")]) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")], model.selection("EDGE", "PartSet/OY"), 100) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Translation_1_1/ME:Translated&Face_1_1/Edge_4"), model.selection("EDGE", "Translation_1_1/ME:Translated&Face_1_1/Edge_3"), model.selection("EDGE", "Translation_1_1/ME:Translated&Face_1_1/Edge_2"), model.selection("EDGE", "Translation_1_1/ME:Translated&Face_1_1/Edge_1"), model.selection("EDGE", "Translation_1_2/ME:Translated&Face_2_1/Edge_4"), model.selection("EDGE", "Translation_1_2/ME:Translated&Face_2_1/Edge_3"), model.selection("EDGE", "Translation_1_2/ME:Translated&Face_2_1/Edge_2"), model.selection("EDGE", "Translation_1_2/ME:Translated&Face_2_1/Edge_1")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Translation_1_1/ME:Translated&Sketch_1/SketchLine_4"), model.selection("EDGE", "Translation_1_1/ME:Translated&Sketch_1/SketchLine_1"), model.selection("EDGE", "Translation_1_1/ME:Translated&Sketch_1/SketchLine_5"), model.selection("EDGE", "Translation_1_1/ME:Translated&Sketch_1/SketchLine_3"), model.selection("EDGE", "Translation_1_2/ME:Translated&Sketch_1/SketchLine_1"), model.selection("EDGE", "Translation_1_2/ME:Translated&Sketch_1/SketchLine_2"), model.selection("EDGE", "Translation_1_2/ME:Translated&Sketch_1/SketchLine_3"), model.selection("EDGE", "Translation_1_2/ME:Translated&Sketch_1/SketchLine_5")]) aGroupFeature = Group_1.feature() aSelectionList = aGroupFeature.selectionList("group_list") model.end() diff --git a/src/CollectionPlugin/Test/TestGroup2.py b/src/CollectionPlugin/Test/TestGroup2.py index 87a266d0b..3efcf9c1c 100644 --- a/src/CollectionPlugin/Test/TestGroup2.py +++ b/src/CollectionPlugin/Test/TestGroup2.py @@ -75,16 +75,16 @@ model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), 10, 0) AngularCopy_1 = model.addMultiRotation(Part_1_doc, [model.selection("COMPOUND", "all-in-Extrusion_1")], model.selection("EDGE", "PartSet/OZ"), "90.-r*3", 2) Cut_1 = model.addCut(Part_1_doc, [model.selection("FACE", "Face_1_1")], [model.selection("COMPOUND", "AngularCopy_1_1")]) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Edge_4")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Modified_Edge&Sketch_1/SketchArc_1_2")]) Group_1.setName("edge_int") Group_1.result().setName("edge_int") -Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Edge_1")]) +Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Modified_Edge&Sketch_1/SketchLine_2")]) Group_2.setName("edge_bottom") Group_2.result().setName("edge_bottom") -Group_3 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Edge_3")]) +Group_3 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Modified_Edge&Sketch_1/SketchLine_1")]) Group_3.setName("edge_left") Group_3.result().setName("edge_left") -Group_4 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Edge_2")]) +Group_4 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Face_1_1/Modified_Edge&Sketch_1/SketchArc_2_2")]) Group_4.setName("edge_ext") Group_4.result().setName("edge_ext") model.do() diff --git a/src/FeaturesPlugin/Test/Test1942.py b/src/FeaturesPlugin/Test/Test1942.py index d11aaaca1..50f9dffa9 100644 --- a/src/FeaturesPlugin/Test/Test1942.py +++ b/src/FeaturesPlugin/Test/Test1942.py @@ -184,17 +184,17 @@ Face_1_objects = [model.selection("EDGE", "Sketch_1/SketchArc_2_2"), model.selec Face_1 = model.addFace(Part_1_doc, Face_1_objects) Intersection_1 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Recover_1_1"), model.selection("FACE", "Face_1_1")]) Group_1_objects = [ -model.selection("VERTEX", "[Intersection_1_1_3/Intersection_1_1_3&Face_1_1/Edge_3][weak_name_2]"), -model.selection("VERTEX", "[Intersection_1_1_1/Intersection_1_1_1][weak_name_2]"), -model.selection("VERTEX", "[Intersection_1_1_9/Intersection_1_1_9&Face_1_1/Edge_7][weak_name_1]"), -model.selection("VERTEX", "[Intersection_1_1_7/Intersection_1_1_7&Face_1_1/Edge_5][weak_name_2]"), -model.selection("VERTEX", "[Intersection_1_1_4/Intersection_1_1_4][weak_name_2]"), -model.selection("VERTEX", "[Intersection_1_1_1/Intersection_1_1_1][weak_name_1]"), -model.selection("VERTEX", "[Intersection_1_1_2/Intersection_1_1_2&Face_1_1/Edge_2][weak_name_1]"), -model.selection("VERTEX", "[Intersection_1_1_4/Intersection_1_1_4][weak_name_1]"), -model.selection("VERTEX", "[Intersection_1_1_6/Intersection_1_1_6&Face_1_1/Edge_4][weak_name_2]"), -model.selection("VERTEX", "[Intersection_1_1_10/Intersection_1_1_10&Face_1_1/Edge_8][weak_name_1]"), -model.selection("VERTEX", "[Intersection_1_1_8/Intersection_1_1_8&Face_1_1/Edge_6][weak_name_1]")] +model.selection("VERTEX", "Intersection_1_1_3/Modified_Vertex&Sketch_1/SketchLine_1_StartVertex&Sketch_1/SketchLine_8_EndVertex"), +model.selection("VERTEX", "[Intersection_1_1_1/Intersection_1_1_1]e[weak_name_2]"), +model.selection("VERTEX", "Intersection_1_1_9/Modified_Vertex&Sketch_1/SketchLine_5_StartVertex&Sketch_1/SketchLine_4_EndVertex"), +model.selection("VERTEX", "Intersection_1_1_7/Modified_Vertex&Sketch_1/SketchLine_7_StartVertex&Sketch_1/SketchLine_6_EndVertex"), +model.selection("VERTEX", "[Intersection_1_1_4/Intersection_1_1_4]e[weak_name_2]"), +model.selection("VERTEX", "[Intersection_1_1_1/Intersection_1_1_1]e[weak_name_1]"), +model.selection("VERTEX", "Intersection_1_1_2/Modified_Vertex&Sketch_1/SketchLine_2_EndVertex&Sketch_1/SketchArc_2_2_EndVertex"), +model.selection("VERTEX", "[Intersection_1_1_4/Intersection_1_1_4]e[weak_name_1]"), +model.selection("VERTEX", "Intersection_1_1_6/Modified_Vertex&Sketch_1/SketchLine_8_StartVertex&Sketch_1/SketchLine_7_EndVertex"), +model.selection("VERTEX", "Intersection_1_1_10/Modified_Vertex&Sketch_1/SketchLine_4_StartVertex&Sketch_1/SketchArc_2_2_StartVertex"), +model.selection("VERTEX", "Intersection_1_1_8/Modified_Vertex&Sketch_1/SketchLine_6_StartVertex&Sketch_1/SketchLine_5_EndVertex")] Group_1 = model.addGroup(Part_1_doc, Group_1_objects) Group_2_objects = [model.selection("EDGE", "Intersection_1_1_7"), model.selection("EDGE", "Intersection_1_1_6"), model.selection("EDGE", "Intersection_1_1_3"), model.selection("EDGE", "Intersection_1_1_11"), model.selection("EDGE", "Intersection_1_1_5"), model.selection("EDGE", "Intersection_1_1_1"), model.selection("EDGE", "Intersection_1_1_4"), model.selection("EDGE", "Intersection_1_1_2"), model.selection("EDGE", "Intersection_1_1_10"), model.selection("EDGE", "Intersection_1_1_9"), model.selection("EDGE", "Intersection_1_1_8")] diff --git a/src/FeaturesPlugin/Test/Test2197_2.py b/src/FeaturesPlugin/Test/Test2197_2.py index 667e8ded8..e821a0ae5 100644 --- a/src/FeaturesPlugin/Test/Test2197_2.py +++ b/src/FeaturesPlugin/Test/Test2197_2.py @@ -30,9 +30,9 @@ SketchCircle_1 = Sketch_1.addCircle(-150, 80, 100) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_1_2")]) Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Face_1_1")], model.selection("EDGE", "PartSet/OZ"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Face_1_1/Edge_1][weak_name_1]")]) -Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Face_1_1/Edge_1][weak_name_2]")]) -Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Face_1_1/Edge_1]")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][weak_name_1]")]) +Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "[Revolution_1_1/Generated_Face&Sketch_1/SketchCircle_1_2][weak_name_2]")]) +Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "[Revolution_1_1/Generated_Face&Sketch_1/SketchCircle_1_2]")]) model.do() model.end() diff --git a/src/FeaturesPlugin/Test/Test2222.py b/src/FeaturesPlugin/Test/Test2222.py index 6438d8938..98e490cbb 100644 --- a/src/FeaturesPlugin/Test/Test2222.py +++ b/src/FeaturesPlugin/Test/Test2222.py @@ -43,7 +43,7 @@ Face_1_objects = [model.selection("EDGE", "Sketch_1/SketchLine_2"), model.select Face_1 = model.addFace(Part_1_doc, Face_1_objects) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 1, False) Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Plane_1")]) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Partition_1_1_2/Modified_Edge&Face_1_1/Edge_4")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Partition_1_1_2/Modified_Edge&Sketch_1/SketchLine_1")]) model.do() model.end() diff --git a/src/FeaturesPlugin/Test/Test2240.py b/src/FeaturesPlugin/Test/Test2240.py index 41d8cca7a..84f82d774 100644 --- a/src/FeaturesPlugin/Test/Test2240.py +++ b/src/FeaturesPlugin/Test/Test2240.py @@ -111,7 +111,7 @@ Group_2.result().setName("acier") Group_2.result().setColor(170, 85, 0) 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", "[Partition_1_1_1/Modified_Edge&Face_4_1/Edge_7&Face_1_1/Edge_7][Partition_1_1_1/Modified_Edge&Face_4_1/Edge_6&Face_1_1/Edge_6]")) +SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "[Partition_1_1_1/Modified_Edge&Sketch_1/SketchLine_9]e[Partition_1_1_1/Modified_Edge&Sketch_1/SketchLine_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) @@ -143,7 +143,7 @@ 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", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex")) LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 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", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e")) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_13_EndVertex&Sketch_3/SketchLine_14_StartVertex")) LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 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", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex")) diff --git a/src/FeaturesPlugin/Test/Test2419_2.py b/src/FeaturesPlugin/Test/Test2419_2.py index 07b640049..4aa76fd6e 100644 --- a/src/FeaturesPlugin/Test/Test2419_2.py +++ b/src/FeaturesPlugin/Test/Test2419_2.py @@ -109,7 +109,7 @@ Group_2.result().setName("acier") Group_2.result().setColor(170, 85, 0) Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0) -SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "[Face_4_1/Edge_6][Face_4_1/Edge_7]"), False) +SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), False) SketchPoint_1 = SketchProjection_1.createdFeature() SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result()) SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19") @@ -142,7 +142,7 @@ 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", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex")) LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 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", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e")) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_13_EndVertex&Sketch_3/SketchLine_14_StartVertex")) LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 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", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex")) diff --git a/src/FeaturesPlugin/Test/Test2419_3.py b/src/FeaturesPlugin/Test/Test2419_3.py index 115fef926..9ddfe5e97 100644 --- a/src/FeaturesPlugin/Test/Test2419_3.py +++ b/src/FeaturesPlugin/Test/Test2419_3.py @@ -109,7 +109,7 @@ Group_2.result().setName("acier") Group_2.result().setColor(170, 85, 0) Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0) -SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "[Face_4_1/Edge_6][Face_4_1/Edge_7]"), False) +SketchProjection_1 = Sketch_3.addProjection(model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), False) SketchPoint_1 = SketchProjection_1.createdFeature() SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result()) SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19") @@ -142,7 +142,7 @@ 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", "Sketch_3/SketchLine_11_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_3_EndVertex")) LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 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", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_4]e")) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_13_EndVertex&Sketch_3/SketchLine_14_StartVertex")) LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "length_assemblage", 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", "Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Sketch_1/SketchLine_1_StartVertex")) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py b/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py index 9be235d56..1aa04ef74 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_Face_Solid.py @@ -45,7 +45,7 @@ SketchConstraintVertical_2 = Sketch_2.setVertical(SketchLine_4.result()) model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 10, 10) Cut_1 = model.addCut(Part_1_doc, [model.selection("FACE", "Face_1_1")], [model.selection("SOLID", "Extrusion_1_1")]) -Group_1_objects = [model.selection("VERTEX", "Cut_1_1/Generated_Vertex&Sketch_2/SketchLine_3&Face_1_1/Edge_1"), model.selection("FACE", "Cut_1_1"), model.selection("FACE", "Cut_1_1"), model.selection("VERTEX", "Cut_1_1/Generated_Vertex&Face_1_1/Face_1_1")] +Group_1_objects = [model.selection("VERTEX", "Cut_1_1/Generated_Vertex&Sketch_2/SketchLine_3&Sketch_1/SketchCircle_1_2"), model.selection("FACE", "Cut_1_1"), model.selection("FACE", "Cut_1_1"), model.selection("VERTEX", "Cut_1_1/Generated_Vertex&Face_1_1/Face_1_1")] Group_1 = model.addGroup(Part_1_doc, Group_1_objects) Group_2_objects = [model.selection("FACE", "Cut_1_1"), model.selection("EDGE", "Cut_1_1/Generated_Edge&Sketch_2/SketchLine_3&Face_1_1/Face_1_1"), model.selection("VERTEX", "Cut_1_1/Generated_Vertex&Face_1_1/Face_1_1"), model.selection("FACE", "Cut_1_1")] Group_2 = model.addGroup(Part_1_doc, Group_2_objects) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_SolidsHistory.py b/src/FeaturesPlugin/Test/TestBooleanFuse_SolidsHistory.py index b966d42df..7e000ab04 100644 --- a/src/FeaturesPlugin/Test/TestBooleanFuse_SolidsHistory.py +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_SolidsHistory.py @@ -51,11 +51,11 @@ SketchCircle_2 = Sketch_2.addCircle(-5.846059113300496, 9.453201970443347, 11.01 model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "all-in-Sketch_1")], model.selection(), 10, 0) Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), 11, 1) -Group_1_objects = [model.selection("SOLID", "Extrusion_1_2_1"), model.selection("SOLID", "Extrusion_1_2_2"), model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_1_1")] +Group_1_objects = [model.selection("SOLID", "Extrusion_1_1_1"), model.selection("SOLID", "Extrusion_1_1_2"), model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_1_2")] Group_1 = model.addGroup(Part_1_doc, Group_1_objects) -Group_2_objects = [model.selection("FACE", "Extrusion_1_2_1/To_Face"), model.selection("FACE", "Extrusion_1_2_2/To_Face"), model.selection("FACE", "Extrusion_2_1/To_Face"), model.selection("FACE", "Extrusion_1_1/To_Face")] +Group_2_objects = [model.selection("FACE", "Extrusion_1_1_1/To_Face"), model.selection("FACE", "Extrusion_1_1_2/To_Face"), model.selection("FACE", "Extrusion_2_1/To_Face"), model.selection("FACE", "Extrusion_1_2/To_Face")] Group_2 = model.addGroup(Part_1_doc, Group_2_objects) -Fuse_1_objects_1 = [model.selection("SOLID", "Extrusion_1_2_2"), model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_1_1")] +Fuse_1_objects_1 = [model.selection("SOLID", "Extrusion_1_1_2"), model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_1_2")] Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1) model.do() # move group diff --git a/src/FeaturesPlugin/Test/TestFusionFaces2697.py b/src/FeaturesPlugin/Test/TestFusionFaces2697.py index c70f51e66..c84cd2958 100644 --- a/src/FeaturesPlugin/Test/TestFusionFaces2697.py +++ b/src/FeaturesPlugin/Test/TestFusionFaces2697.py @@ -101,7 +101,7 @@ SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_46") SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_8.endPoint()) SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_47") model.do() -Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_19f-SketchLine_23r-SketchLine_24r-SketchArc_3_2r-SketchLine_13f-SketchArc_1_2f-SketchLine_11r")], model.selection("EDGE", "PartSet/OZ"), 360, 0) +Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_11r-SketchArc_1_2f-SketchLine_13f-SketchArc_3_2r-SketchLine_24r-SketchLine_23r-SketchLine_19f")], model.selection("EDGE", "PartSet/OZ"), 360, 0) Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ")) SketchLine_9 = Sketch_2.addLine(0, 2.425, 3.282538500974061, 11.74164236673401) SketchLine_9.setName("SketchLine_34") @@ -246,9 +246,9 @@ SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_84") SketchConstraintCoincidence_44 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_19.endPoint()) SketchConstraintCoincidence_44.setName("SketchConstraintCoincidence_85") model.do() -Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_44f-SketchArc_8_2r-SketchLine_45r-SketchArc_5_2f")], model.selection("EDGE", "Sketch_2/SketchLine_34"), 360, 0) +Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_5_2f-SketchLine_45r-SketchArc_8_2r-SketchLine_44f")], model.selection("EDGE", "Sketch_2/SketchLine_34"), 360, 0) Revolution_2.result().setName("Cut_tool") -Revolution_3 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_39r-SketchLine_40r-SketchLine_41r-SketchArc_8_2r-SketchLine_44r-SketchArc_5_2f")], model.selection("EDGE", "Sketch_2/SketchLine_34"), 360, 0) +Revolution_3 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_5_2f-SketchLine_44r-SketchArc_8_2r-SketchLine_41r-SketchLine_40r-SketchLine_39r")], model.selection("EDGE", "Sketch_2/SketchLine_34"), 360, 0) Revolution_3.result().setName("Fuse_tool") Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cut_tool"), model.selection("SOLID", "Fuse_tool")], model.selection("EDGE", "PartSet/OZ"), True) Symmetry_1.result().subResult(0).setName("Symmetry_1_1_1") diff --git a/src/ModelAPI/Test/Test2241.py b/src/ModelAPI/Test/Test2241.py index b574ba9e8..d325fb59d 100644 --- a/src/ModelAPI/Test/Test2241.py +++ b/src/ModelAPI/Test/Test2241.py @@ -102,7 +102,7 @@ Face_4_objects = [model.selection("EDGE", "Sketch_2/SketchCircle_1_2"), model.se 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]e[Face_1_1/Edge_7]e")) +SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex")) 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) @@ -128,16 +128,16 @@ model.do() 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")) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_6_StartVertex&Sketch_1/SketchLine_5_EndVertex")) 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")) +Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_4_StartVertex&Sketch_1/SketchLine_3_EndVertex")) 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&Face_5_1/Edge_1]e[LinearCopy_3_1_1/ME:Translated_Edge&Face_5_1/Edge_2]e")) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_12_EndVertex&Sketch_3/SketchLine_13_StartVertex")) 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")) +Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_10_StartVertex&Sketch_1/SketchLine_1_StartVertex")) 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)