3 Test case for issue #2018 "After split auxiliary circle edit of axiliary state of arc is wrong"
6 from ModelAPI import ModelAPI_Feature
7 from SketchAPI import SketchAPI_Arc
8 from salome.shaper import model
10 def getArcs(theSketch):
12 for aSubObj in theSketch.features().list():
13 aFeature = ModelAPI_Feature.feature(aSubObj)
14 if aFeature is not None and aFeature.getKind() == "SketchArc":
15 anArcs.append(aFeature)
20 partSet = model.moduleDocument()
21 Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
22 SketchCircle_1 = Sketch_1.addCircle(-316.2976090885591, -103.0319555403832, 230.3644881376851)
23 SketchCircle_1.setAuxiliary(True)
24 SketchLine_1 = Sketch_1.addLine(-489.6131019153831, 48.7229038254136, -457.9545454545454, 334.0909090909091)
25 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
26 SketchLine_2 = Sketch_1.addLine(-457.9545454545454, 334.0909090909091, -251.2069112222553, 117.9454153513332)
27 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
28 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
29 Sketch_1.addSplit(SketchCircle_1, SketchLine_1.startPoint(), SketchLine_2.endPoint())
32 anArcs = getArcs(Sketch_1)
33 # check auxiliary flags
35 aCurrentArc = SketchAPI_Arc(arc)
36 assert(aCurrentArc.auxiliary().value())
37 aCurrentArc.setAuxiliary(False)
39 assert(aCurrentArc.auxiliary().value() == False)
43 assert(model.checkPythonDump())