]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update unit tests according to PlaneGCS 0.18 behavior Porting_PlaneGCS_0.18
authorazv <azv@opencascade.com>
Thu, 2 Aug 2018 08:17:02 +0000 (11:17 +0300)
committerazv <azv@opencascade.com>
Thu, 2 Aug 2018 08:17:02 +0000 (11:17 +0300)
src/BuildPlugin/Test/Test2398.py
src/BuildPlugin/Test/TestCompSolid.py
src/BuildPlugin/Test/TestSolid.py
src/CollectionPlugin/Test/TestGroup1799.py
src/FeaturesPlugin/Test/Test1379.py
src/FeaturesPlugin/Test/Test2514.py
src/ModelAPI/Test/Test2510.py
src/SketchPlugin/Test/Test2229.py

index 128a26af0e875c20da09c6fd8befb6381ac878a8..d8de4b72594cc32f508ca8b5a5b0b99445b31b09 100644 (file)
@@ -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])
index 24fe6bda51c7687e123c8b8d39ec532f51a4afc5..f27cb0a8b956d6c9eadc67b03c2a5c967df873e5 100644 (file)
@@ -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)
index 245ec16fc337ac17a2dec5c1979310d61b88d5ee..f0be3f0a06fafafbe339a52671da8d3f6b0d38a8 100644 (file)
@@ -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)
index 5d67a8fd40f9ce419f42c2767968094802a515f6..cacc2aeacd67405ed469f03040c55ae5273ecb8d 100644 (file)
@@ -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())
index b2abb18f64d2cd9977203e8aaf7ce4c58e10f7b4..ca70c5283f849b9c22c7cd9753bbd122705bcc7c 100644 (file)
@@ -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())
index a4b592e6d286328f89197f9eea0dfead255059f7..d8ea46b65b5c9a7376a79740af9dfa756ebb3e02 100644 (file)
@@ -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")
index d1b5bc3fdd189318fc68301c9d606209abf1b3d0..09838dd7a48bdb86502320a75a10785519bdcfbd 100644 (file)
@@ -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")
index da8f65af2fb3b04baf510c918bf15ada6888e584..22a3809220e729e8049f07285464df904ac0faca 100644 (file)
@@ -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)