From: mzn Date: Mon, 20 Aug 2018 13:15:20 +0000 (+0300) Subject: Update unit tests according to PlaneGCS 0.18 behavior X-Git-Tag: SHAPER_V9_1_0RC1~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1108260f60b2492b1858d71e9b6c9f5fb8c75d84;p=modules%2Fshaper.git Update unit tests according to PlaneGCS 0.18 behavior --- diff --git a/src/BuildPlugin/Test/Test2398.py b/src/BuildPlugin/Test/Test2398.py index 8ce7bf34b..2331d8722 100644 --- a/src/BuildPlugin/Test/Test2398.py +++ b/src/BuildPlugin/Test/Test2398.py @@ -92,10 +92,10 @@ model.do() from GeomAPI import * # check fillings -REF_DATA = [(Filling_1, 718.953888643813570524798706174), - (Filling_2, 910.698815675366518007649574429), - (Filling_3, 718.953684242875738164002541453), - (Filling_4, 910.697703817550063831731677055)] +REF_DATA = [(Filling_1, 719.149788883378505488508380949), + (Filling_2, 910.894041506332769131404347718), + (Filling_3, 719.149788883378505488508380949), + (Filling_4, 910.894530912501409147807862610)] for ref in REF_DATA: model.testNbResults(ref[0], 1) model.testNbSubResults(ref[0], [0]) diff --git a/src/BuildPlugin/Test/TestCompSolid.py b/src/BuildPlugin/Test/TestCompSolid.py index 24fe6bda5..f27cb0a8b 100644 --- a/src/BuildPlugin/Test/TestCompSolid.py +++ b/src/BuildPlugin/Test/TestCompSolid.py @@ -55,7 +55,6 @@ SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) -SketchConstraintHorizontal_3 = Sketch_2.setHorizontal(SketchLine_5.result()) SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_8.result()) @@ -89,8 +88,6 @@ SketchConstraintCoincidence_15 = Sketch_3.setCoincident(SketchLine_16.endPoint() SketchConstraintCoincidence_16 = Sketch_3.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint()) SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchLine_15.endPoint(), SketchLine_16.startPoint()) -SketchConstraintHorizontal_6 = Sketch_3.setHorizontal(SketchLine_13.result()) -SketchConstraintVertical_7 = Sketch_3.setVertical(SketchLine_14.result()) SketchConstraintHorizontal_7 = Sketch_3.setHorizontal(SketchLine_15.result()) SketchConstraintVertical_8 = Sketch_3.setVertical(SketchLine_16.result()) SketchProjection_3 = Sketch_3.addProjection(model.selection("VERTEX", "Sketch_2/Vertex-SketchLine_5s-SketchLine_15s-SketchLine_8e-SketchLine_14e"), False) diff --git a/src/BuildPlugin/Test/TestSolid.py b/src/BuildPlugin/Test/TestSolid.py index 245ec16fc..f0be3f0a0 100644 --- a/src/BuildPlugin/Test/TestSolid.py +++ b/src/BuildPlugin/Test/TestSolid.py @@ -55,7 +55,6 @@ SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) -SketchConstraintHorizontal_3 = Sketch_2.setHorizontal(SketchLine_5.result()) SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_8.result()) @@ -89,8 +88,6 @@ SketchConstraintCoincidence_15 = Sketch_3.setCoincident(SketchLine_16.endPoint() SketchConstraintCoincidence_16 = Sketch_3.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint()) SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint()) SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchLine_15.endPoint(), SketchLine_16.startPoint()) -SketchConstraintHorizontal_6 = Sketch_3.setHorizontal(SketchLine_13.result()) -SketchConstraintVertical_7 = Sketch_3.setVertical(SketchLine_14.result()) SketchConstraintHorizontal_7 = Sketch_3.setHorizontal(SketchLine_15.result()) SketchConstraintVertical_8 = Sketch_3.setVertical(SketchLine_16.result()) SketchProjection_3 = Sketch_3.addProjection(model.selection("VERTEX", "Sketch_2/Vertex-SketchLine_5s-SketchLine_15s-SketchLine_8e-SketchLine_14e"), False) diff --git a/src/CollectionPlugin/Test/TestGroup1799.py b/src/CollectionPlugin/Test/TestGroup1799.py index 5d67a8fd4..cacc2aeac 100644 --- a/src/CollectionPlugin/Test/TestGroup1799.py +++ b/src/CollectionPlugin/Test/TestGroup1799.py @@ -73,7 +73,7 @@ SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchPoint_8.coordinate SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_6.startPoint()) SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_1.result(), SketchLine_6.result()) SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_2.startPoint()) -SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_7.result()) +#SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_7.result()) SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint()) SketchConstraintParallel_3 = Sketch_1.setParallel(SketchLine_4.result(), SketchLine_5.result()) SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_8.startPoint()) diff --git a/src/FeaturesPlugin/Test/Test1379.py b/src/FeaturesPlugin/Test/Test1379.py index b2abb18f6..ca70c5283 100644 --- a/src/FeaturesPlugin/Test/Test1379.py +++ b/src/FeaturesPlugin/Test/Test1379.py @@ -206,12 +206,6 @@ SketchLine_21 = Sketch_3.addLine(0.008999999999999999, 0.042, 0.029, 0.042) SketchLine_21.setName("SketchLine_9") SketchLine_21.result().setName("SketchLine_9") SketchLine_21.result().setColor(0, 150, 0) -SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), False) -SketchLine_22 = SketchProjection_6.createdFeature() -SketchLine_22.setName("SketchLine_10") -SketchLine_22.result().setName("SketchLine_10") -SketchConstraintCoincidence_25 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_22.result()) -SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_9") SketchConstraintCoincidence_26 = Sketch_3.setCoincident(SketchLine_19.startPoint(), SketchLine_21.endPoint()) SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_10") SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_20.endPoint()) diff --git a/src/FeaturesPlugin/Test/Test2514.py b/src/FeaturesPlugin/Test/Test2514.py index a4b592e6d..d8ea46b65 100644 --- a/src/FeaturesPlugin/Test/Test2514.py +++ b/src/FeaturesPlugin/Test/Test2514.py @@ -122,12 +122,6 @@ SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_21") SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchLine_13.endPoint()) SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_22") SketchConstraintHorizontal_2 = Sketch_2.setHorizontal(SketchLine_12.result()) -SketchProjection_5 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), False) -SketchLine_14 = SketchProjection_5.createdFeature() -SketchLine_14.setName("SketchLine_15") -SketchLine_14.result().setName("SketchLine_15") -SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_11.startPoint(), SketchLine_14.result()) -SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_23") SketchPoint_2 = Sketch_2.addPoint(-5.903605550615992e-026, -5) SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchPoint_2.coordinates(), SketchLine_12.result()) SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_24") @@ -296,7 +290,7 @@ SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_55") SketchConstraintVertical_6 = Sketch_3.setVertical(SketchLine_33.result()) SketchConstraintVertical_7 = Sketch_3.setVertical(SketchLine_32.result()) SketchConstraintVertical_8 = Sketch_3.setVertical(SketchLine_31.result()) -SketchConstraintVertical_9 = Sketch_3.setVertical(SketchLine_30.result()) +#SketchConstraintVertical_9 = Sketch_3.setVertical(SketchLine_30.result()) SketchConstraintHorizontal_6 = Sketch_3.setHorizontal(SketchLine_34.result()) SketchConstraintCoincidence_53 = Sketch_3.setCoincident(SketchLine_32.endPoint(), SketchLine_34.result()) SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_56") diff --git a/src/ModelAPI/Test/Test2510.py b/src/ModelAPI/Test/Test2510.py index d1b5bc3fd..09838dd7a 100644 --- a/src/ModelAPI/Test/Test2510.py +++ b/src/ModelAPI/Test/Test2510.py @@ -185,7 +185,6 @@ SketchArc_14.setName("SketchArc_17") SketchArc_14.result().setName("SketchArc_17") SketchArc_14.results()[1].setName("SketchArc_17_2") SketchConstraintCoincidence_41 = Sketch_1.setCoincident(SketchLine_19.endPoint(), SketchArc_14.startPoint()) -SketchConstraintTangent_11 = Sketch_1.setTangent(SketchLine_19.result(), SketchArc_14.results()[1]) SketchArc_15 = Sketch_1.addArc(2.43000002278185, 1.189896770657599, 2.429999974807022, 3.674999999999994, 3.904833906055851, 3.190047534283911, True) SketchArc_15.setName("SketchArc_18") SketchArc_15.result().setName("SketchArc_18") diff --git a/src/SketchPlugin/Test/Test2229.py b/src/SketchPlugin/Test/Test2229.py index da8f65af2..22a380922 100644 --- a/src/SketchPlugin/Test/Test2229.py +++ b/src/SketchPlugin/Test/Test2229.py @@ -38,6 +38,6 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintDistance_1 = Sketch_1.setDistance(SketchPoint_1.coordinates(), SketchLine_2.result(), "Wall_R+Wall_T1") model.end() -# check that resulting sketch is valid +# check that resulting sketch is not valid (since PlanGCS 0.18) aFactory = ModelAPI_Session.get().validators() -assert(aFactory.validate(Sketch_1.feature())) +assert(aFactory.validate(Sketch_1.feature()) == False)