]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/doc/bsplineFeature.rst
Salome HOME
Merge branch 'occ/shaper2smesh'
[modules/shaper.git] / src / SketchPlugin / doc / bsplineFeature.rst
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
4
5 B-spline and periodic B-spline
6 ==============================
7
8 The feature creates a free form spline curve in the current Sketch.
9
10 To add a new B-spline to the Sketch:
11
12 #. select in the Main Menu *Sketch - > B-spline* item  or
13 #. click |bspline.icon| **B-spline** button in the Sketch toolbar.
14
15 To add a periodic B-spline to the Sketch:
16
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.
19
20
21 Creation of B-spline curve
22 """"""""""""""""""""""""""
23
24 .. image:: images/bspline_creation_panel.png
25    :align: center
26
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.
28
29
30 **TUI Command**:
31
32 .. py:function:: Sketch_1.addSpline(degree, poles, weights, knots, multiplicities, periodic)
33
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.
41
42 Each parameter is optional.
43
44 Result
45 """"""
46
47 Created B-spline curve appears in the view.
48
49 .. image:: images/bspline_result.png
50            :align: center
51
52 .. centered::
53    Non-periodic B-spline created
54
55
56 .. image:: images/bspline_periodic_result.png
57            :align: center
58
59 .. centered::
60    Periodic B-spline created
61
62 **See Also** a sample TUI Script of :ref:`tui_create_bspline` operation.
63
64
65 Modification of B-spline curve
66 """"""""""""""""""""""""""""""
67
68 .. image:: images/bspline_modification_panel.png
69    :align: center
70
71 .. centered::
72    Modification panel for B-spline curve
73
74 The following options are provided to modify the already created B-spline curve:
75
76 #. Change weight of each pole.
77 #. Add new pole.
78
79 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. 
80
81 **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.