#=========================================================================
Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
SketchLine_1 = Sketch_1.addLine(20, 20, 40, 80)
-SketchLine_1.setName("SketchLine_1")
-SketchLine_1.result().setName("SketchLine_1")
SketchLine_2 = Sketch_1.addLine(40, 80, 60, 40)
-SketchLine_2.setName("SketchLine_2")
-SketchLine_2.result().setName("SketchLine_2")
SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
-SketchConstraintCoincidence_1.setName("SketchConstraintCoincidence_2")
SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
-SketchConstraintHorizontal_1.setName("SketchConstraintHorizontal_1")
-SketchConstraintVertical_1.setName("SketchConstraintVertical_1")
model.do()
#=========================================================================
# Checking that sketch and constraints become invalid when to one line
#=========================================================================
aFactory = ModelAPI_Session.get().validators()
assert(aFactory.validate(Sketch_1.feature()))
-assert(Sketch_1.feature().error() == "Sketch objects are not defined")
+assert(Sketch_1.feature().error() != '')
#=========================================================================
# Remove duplicated Vertical constraints
#=========================================================================
assert(aFactory.validate(Sketch_1.feature()))
assert(Sketch_1.feature().error() == '')
-#assert(model.checkPythonDump())
+assert(model.checkPythonDump())