1 .. |bspline.icon| image:: images/bspline.png
2 .. |bspline_p.icon| image:: images/bspline_p.png
3 .. |add_pole.icon| image:: images/bspline_add_pole.png
5 B-spline and periodic B-spline
6 ==============================
8 The feature creates a free form spline curve in the current Sketch.
10 To add a new B-spline to the Sketch:
12 #. select in the Main Menu *Sketch - > B-spline* item or
13 #. click |bspline.icon| **B-spline** button in the Sketch toolbar.
15 To add a periodic B-spline to the Sketch:
17 #. select in the Main Menu *Sketch - > Periodic B-spline* item or
18 #. click |bspline_p.icon| **Periodic B-spline** button in the Sketch toolbar.
21 Creation of B-spline curve
22 """"""""""""""""""""""""""
24 .. figure:: images/bspline_creation_panel.png
27 Click in the view to specify the control polygon of B-spline curve. The curve will be shown after the second point is initialized. To stop adding new poles, click **Esc** button or **Apply** the operation.
32 .. py:function:: Sketch_1.addSpline(degree, poles, weights, knots, multiplicities, periodic)
34 :param integer: degree of B-spline.
35 :param array: list of poles [(x1, y1), (x2, y2), ...].
36 :param array: list of weights for corresponding poles.
37 :param array: parametric knots of B-spline curve.
38 :param array: multiplicity of each knot.
39 :param boolean: True mentions that the B-spline curve is periodic.
40 :return: Result object.
42 Each parameter is optional.
47 Created B-spline curve appears in the view.
49 .. figure:: images/bspline_result.png
52 Non-periodic B-spline created
55 .. figure:: images/bspline_periodic_result.png
58 Periodic B-spline created
60 **See Also** a sample TUI Script of :ref:`tui_create_bspline` operation.
63 Modification of B-spline curve
64 """"""""""""""""""""""""""""""
66 .. figure:: images/bspline_modification_panel.png
69 Modification panel for B-spline curve
71 The following options are provided to modify the already created B-spline curve:
73 #. Change weight of each pole.
76 The new pole is added after the current by pressing on the corresponding |add_pole.icon| button. The default weight for the new pole is 1.
78 **Note:** adding the new pole after the last for non-periodic B-spline will not change the last point of the curve to avoid modification of full sketch.