3 Test case for issue #1061 "Distance constraint using for points with equal coordinates"
7 from salome.shaper import model
10 partSet = model.moduleDocument()
11 Part_1 = model.addPart(partSet)
12 Part_1_doc = Part_1.document()
14 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
15 SketchLine_1 = Sketch_1.addLine(70, 120, 50, 25)
16 SketchLine_2 = Sketch_1.addLine(50, 25, 170, 50)
19 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_1.endPoint(), SketchLine_2.startPoint(), DISTANCE)
22 # check distance between points
23 aDist2 = (SketchLine_1.endPoint().x() - SketchLine_2.startPoint().x())**2 + (SketchLine_1.endPoint().y() - SketchLine_2.startPoint().y())**2
24 assert(math.fabs(aDist2 - DISTANCE**2) > 1e-12)
28 assert(model.checkPythonDump())