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])
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())
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)
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())
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)
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())
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())
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")
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")
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")
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)