From: Artem Zhidkov Date: Thu, 3 Dec 2020 15:01:25 +0000 (+0300) Subject: Update unit tests according to new behavior of sketch's MultiRotation/MultiTranslation X-Git-Tag: V9_7_0a1~78 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e9f221ec28425bfe98c60628e0ae8be97673630d;p=modules%2Fshaper.git Update unit tests according to new behavior of sketch's MultiRotation/MultiTranslation --- diff --git a/src/FeaturesPlugin/Test/Test2495.py b/src/FeaturesPlugin/Test/Test2495.py index 7e246a1b3..0a401813a 100644 --- a/src/FeaturesPlugin/Test/Test2495.py +++ b/src/FeaturesPlugin/Test/Test2495.py @@ -124,7 +124,7 @@ SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_20") SketchConstraintDistance_3 = Sketch_1.setDistance(SketchPoint_5.coordinates(), SketchLine_6.result(), 21, True) SketchMultiTranslation_2_objects = [SketchArc_1.results()[1], SketchLine_7.result(), SketchLine_8.result(), SketchArc_2.results()[1], SketchLine_10.result(), SketchArc_5.results()[1], SketchLine_12.result(), SketchArc_3.results()[1], SketchArc_4.results()[1], SketchLine_13.result(), SketchLine_11.result(), SketchArc_6.results()[1]] SketchMultiTranslation_2 = Sketch_1.addTranslation(SketchMultiTranslation_2_objects, SketchPoint_3.coordinates(), SketchPoint_5.coordinates(), 2) -[SketchArc_7, SketchLine_14, SketchLine_15, SketchArc_8, SketchLine_10, SketchLine_16, SketchArc_5, SketchArc_9, SketchLine_12, SketchLine_17, SketchArc_3, SketchArc_10, SketchArc_4, SketchArc_11, SketchLine_13, SketchLine_18, SketchLine_11, SketchLine_19, SketchArc_6, SketchArc_12] = SketchMultiTranslation_2.translated() +[SketchArc_7, SketchLine_14, SketchLine_15, SketchArc_8, SketchLine_16, SketchArc_9, SketchLine_17, SketchArc_10, SketchArc_11, SketchLine_18, SketchLine_19, SketchArc_12] = SketchMultiTranslation_2.translated() SketchLine_19.setName("SketchLine_20") SketchLine_19.result().setName("SketchLine_20") SketchLine_18.setName("SketchLine_19") @@ -295,7 +295,7 @@ SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_46") SketchConstraintDistance_7 = Sketch_1.setDistance(SketchPoint_7.coordinates(), SketchLine_6.result(), 5.3, True) SketchMultiTranslation_4_objects = [SketchLine_20.result(), SketchArc_21.results()[1], SketchLine_22.result(), SketchArc_16.results()[1], SketchLine_41.result(), SketchLine_37.result(), SketchLine_38.result(), SketchArc_33.results()[1], SketchLine_43.result(), SketchLine_24.result(), SketchLine_42.result(), SketchArc_13.results()[1], SketchArc_31.results()[1], SketchLine_36.result(), SketchLine_28.result(), SketchArc_19.results()[1], SketchLine_21.result(), SketchArc_36.results()[1], SketchArc_14.results()[1], SketchArc_24.results()[1], SketchLine_31.result(), SketchArc_32.results()[1], SketchArc_20.results()[1], SketchLine_27.result(), SketchLine_34.result(), SketchArc_30.results()[1], SketchLine_39.result(), SketchArc_25.results()[1], SketchArc_34.results()[1], SketchArc_18.results()[1], SketchLine_40.result(), SketchLine_35.result(), SketchArc_35.results()[1], SketchArc_28.results()[1], SketchLine_32.result(), SketchArc_22.results()[1], SketchArc_26.results()[1], SketchLine_26.result(), SketchLine_30.result(), SketchArc_15.results()[1], SketchLine_33.result(), SketchLine_29.result(), SketchLine_23.result(), SketchLine_25.result(), SketchArc_29.results()[1], SketchArc_23.results()[1], SketchArc_27.results()[1], SketchArc_17.results()[1]] SketchMultiTranslation_4 = Sketch_1.addTranslation(SketchMultiTranslation_4_objects, SketchArc_15.center(), SketchPoint_7.coordinates(), 2) -[SketchLine_44, SketchArc_21, SketchArc_37, SketchLine_45, SketchArc_38, SketchLine_41, SketchLine_46, SketchLine_37, SketchLine_47, SketchLine_38, SketchLine_48, SketchArc_33, SketchArc_39, SketchLine_43, SketchLine_49, SketchLine_24, SketchLine_50, SketchLine_42, SketchLine_51, SketchArc_40, SketchArc_31, SketchArc_41, SketchLine_36, SketchLine_52, SketchLine_28, SketchLine_53, SketchArc_19, SketchArc_42, SketchLine_54, SketchArc_36, SketchArc_43, SketchArc_44, SketchArc_24, SketchArc_45, SketchLine_31, SketchLine_55, SketchArc_32, SketchArc_46, SketchArc_20, SketchArc_47, SketchLine_27, SketchLine_56, SketchLine_34, SketchLine_57, SketchArc_30, SketchArc_48, SketchLine_39, SketchLine_58, SketchArc_25, SketchArc_49, SketchArc_34, SketchArc_50, SketchArc_18, SketchArc_51, SketchLine_40, SketchLine_59, SketchLine_35, SketchLine_60, SketchArc_35, SketchArc_52, SketchArc_28, SketchArc_53, SketchLine_32, SketchLine_61, SketchArc_22, SketchArc_54, SketchArc_26, SketchArc_55, SketchLine_26, SketchLine_62, SketchLine_30, SketchLine_63, SketchArc_56, SketchLine_33, SketchLine_64, SketchLine_29, SketchLine_65, SketchLine_66, SketchLine_25, SketchLine_67, SketchArc_29, SketchArc_57, SketchArc_23, SketchArc_58, SketchArc_27, SketchArc_59, SketchArc_17, SketchArc_60] = SketchMultiTranslation_4.translated() +[SketchLine_44, SketchArc_37, SketchLine_45, SketchArc_38, SketchLine_46, SketchLine_47, SketchLine_48, SketchArc_39, SketchLine_49, SketchLine_50, SketchLine_51, SketchArc_40, SketchArc_41, SketchLine_52, SketchLine_53, SketchArc_42, SketchLine_54, SketchArc_43, SketchArc_44, SketchArc_45, SketchLine_55, SketchArc_46, SketchArc_47, SketchLine_56, SketchLine_57, SketchArc_48, SketchLine_58, SketchArc_49, SketchArc_50, SketchArc_51, SketchLine_59, SketchLine_60, SketchArc_52, SketchArc_53, SketchLine_61, SketchArc_54, SketchArc_55, SketchLine_62, SketchLine_63, SketchArc_56, SketchLine_64, SketchLine_65, SketchLine_66, SketchLine_67, SketchArc_57, SketchArc_58, SketchArc_59, SketchArc_60] = SketchMultiTranslation_4.translated() SketchLine_67.setName("SketchLine_68") SketchLine_67.result().setName("SketchLine_68") SketchLine_66.setName("SketchLine_67") diff --git a/src/FiltersPlugin/Test/Test2946.py b/src/FiltersPlugin/Test/Test2946.py index 0cb89d013..401e75ebf 100644 --- a/src/FiltersPlugin/Test/Test2946.py +++ b/src/FiltersPlugin/Test/Test2946.py @@ -39,7 +39,7 @@ SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_2.result(), SketchLine_1. SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_2.result(), [SketchLine_1.result()]) [SketchLine_3] = SketchConstraintMirror_1.mirrored() SketchMultiRotation_1 = Sketch_1.addRotation([SketchLine_1.result(), SketchLine_3.result()], SketchAPI_Line(SketchLine_2).startPoint(), 360, 4, True) -[SketchLine_4, SketchLine_5, SketchLine_6, SketchLine_3, SketchLine_7, SketchLine_8, SketchLine_9] = SketchMultiRotation_1.rotated() +[SketchLine_4, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8, SketchLine_9] = SketchMultiRotation_1.rotated() SketchArc_1 = Sketch_1.addArc(0, 0, 10.35276180410083, 38.63703305156273, -10.35276180410083, 38.63703305156273, False) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchArc_1.center()) SketchConstraintRadius_3 = Sketch_1.setRadius(SketchArc_1.results()[1], 40) diff --git a/src/FiltersPlugin/Test/Test3241.py b/src/FiltersPlugin/Test/Test3241.py index ea375c2bb..ad6380c41 100644 --- a/src/FiltersPlugin/Test/Test3241.py +++ b/src/FiltersPlugin/Test/Test3241.py @@ -57,7 +57,7 @@ SketchPoint_4 = SketchProjection_4.createdFeature() SketchProjection_5 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OX"), True) SketchLine_1 = SketchProjection_5.createdFeature() SketchMultiRotation_1 = Sketch_4.addRotation([SketchLine_1.result()], SketchAPI_Point(SketchPoint_4).coordinates(), 360, 12, True) -[SketchLine_1, SketchLine_2, SketchLine_3, SketchLine_4, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8, SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_12] = SketchMultiRotation_1.rotated() +[SketchLine_2, SketchLine_3, SketchLine_4, SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8, SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_12] = SketchMultiRotation_1.rotated() model.do() Edge_1 = model.addEdge(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], False) Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "all-in-Edge_1")], model.selection(), model.selection("FACE", "Plane_2"), 0, model.selection(), 0) diff --git a/src/ModelAPI/Test/TestBlockRecalculation.py b/src/ModelAPI/Test/TestBlockRecalculation.py index a01f01328..fc808f1de 100644 --- a/src/ModelAPI/Test/TestBlockRecalculation.py +++ b/src/ModelAPI/Test/TestBlockRecalculation.py @@ -65,7 +65,7 @@ SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_6.result(), SketchConst [SketchLine_7, SketchArc_2, SketchLine_8, SketchLine_9, SketchLine_10] = SketchConstraintMirror_1.mirrored() SketchMultiRotation_1_objects = [SketchLine_10.result(), SketchLine_9.result(), SketchLine_8.result(), SketchArc_2.results()[1], SketchLine_7.result(), SketchLine_1.result(), SketchArc_1.results()[1], SketchLine_2.result(), SketchLine_3.result(), SketchLine_4.result()] SketchMultiRotation_1 = Sketch_1.addRotation(SketchMultiRotation_1_objects, SketchAPI_Line(SketchLine_6).startPoint(), 360, 4, True) -[SketchLine_10, SketchLine_11, SketchLine_12, SketchLine_13, SketchLine_9, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_8, SketchLine_17, SketchLine_18, SketchLine_19, SketchArc_2, SketchArc_3, SketchArc_4, SketchArc_5, SketchLine_7, SketchLine_20, SketchLine_21, SketchLine_22, SketchLine_23, SketchLine_24, SketchLine_25, SketchArc_6, SketchArc_7, SketchArc_8, SketchLine_26, SketchLine_27, SketchLine_28, SketchLine_29, SketchLine_30, SketchLine_31, SketchLine_32, SketchLine_33, SketchLine_34] = SketchMultiRotation_1.rotated() +[SketchLine_11, SketchLine_12, SketchLine_13, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_17, SketchLine_18, SketchLine_19, SketchArc_3, SketchArc_4, SketchArc_5, SketchLine_20, SketchLine_21, SketchLine_22, SketchLine_23, SketchLine_24, SketchLine_25, SketchArc_6, SketchArc_7, SketchArc_8, SketchLine_26, SketchLine_27, SketchLine_28, SketchLine_29, SketchLine_30, SketchLine_31, SketchLine_32, SketchLine_33, SketchLine_34] = SketchMultiRotation_1.rotated() model.do() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document()