from salome.shaper import model
from ModelAPI import *
-def assertNbSubs(theSketch, theNbPoints, theNbLines, theNbEllipses, theNbInternalConstraints):
+def assertNbSubs(theSketch, theNbPoints, theNbLines, theNbSplines, theNbInternalConstraints):
model.testNbSubFeatures(theSketch, "SketchPoint", theNbPoints)
model.testNbSubFeatures(theSketch, "SketchLine", theNbLines)
- model.testNbSubFeatures(theSketch, "SketchBSpline", theNbEllipses)
+ model.testNbSubFeatures(theSketch, "SketchBSpline", theNbSplines)
model.testNbSubFeatures(theSketch, "SketchConstraintCoincidenceInternal", theNbInternalConstraints)
model.begin()
Part_1_doc = Part_1.document()
Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
SketchBSpline_1_poles = [(-30, -10), (-15, 20), (0, -10), (15, 20), (30, -10)]
-SketchBSpline_1 = Sketch_1.addSpline(SketchBSpline_1_poles)
+SketchBSpline_1 = Sketch_1.addSpline(poles = SketchBSpline_1_poles)
controlPoles = SketchBSpline_1.controlPoles(auxiliary = [0, 1, 2, 3, 4])
controlLines = SketchBSpline_1.controlPolygon(auxiliary = [0, 1, 2, 3])
model.do()
partSet = model.moduleDocument()
Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
SketchBSpline_2_poles = [(-30, -10), (-15, -40), (0, -10), (15, -40), (30, -10)]
-SketchBSpline_2 = Sketch_2.addSpline(SketchBSpline_2_poles)
+SketchBSpline_2 = Sketch_2.addSpline(poles = SketchBSpline_2_poles)
controlPoles2 = SketchBSpline_2.controlPoles(auxiliary = [0, 1, 2, 3, 4])
controlLines2 = SketchBSpline_2.controlPolygon(auxiliary = [0, 1, 2, 3])
model.do()