Salome HOME
Merge branch 'CEA_2021_1'
[modules/shaper.git] / src / BuildPlugin / doc / interpolationFeature.rst
1 .. |feature_interpolation.icon|    image:: images/feature_interpolation.png
2
3 Interpolation
4 =============
5
6 Interpolation feature creates an interpolated curve (edge) based on existing points/vertices or based on analytical mathematical expression.
7
8 To create an interpolation in the active part:
9
10 #. select in the Main Menu *Build - > Interpolation* item  or
11 #. click |feature_interpolation.icon| **Interpolation** button in the toolbar
12
13 There are two creation modes of an interpolation:
14
15 .. figure:: images/feature_interpolation_by_selection.png   
16    :align: left
17    :height: 24px
18
19 Interpolation by selection
20
21 .. figure:: images/feature_interpolation_analytical.png   
22    :align: left
23    :height: 24px
24
25 Interpolation analytical
26
27 Interpolation by selection
28 """"""""""""""""""""""""""
29 The property panel is shown below.
30
31 .. figure:: images/Interpolation.png
32   :align: center
33
34   Create an interpolation by selection
35
36 Select one or several vertices or points in the viewer.
37
38 - **Closed** makes the interpolation curve closed.
39
40 - **Reorder** reorders the selected points to minimize the length of curve.
41
42 - **Tangents** makes start and end of the curve tangent to the selected edges. The user has to select start and end edges in the corresponding fields.
43
44 **Apply** button creates an interpolation.
45
46 **Cancel** button cancels the operation. 
47
48 **TUI Commands**:
49
50 .. py:function:: model.addInterpolation(Part_doc, Points, IsClosed, IsReordered)
51
52     :param part: The current part object.
53     :param list: A list of points.
54     :param boolean: Is closed.
55     :param boolean: Is reordered.
56     :return: Result object.
57
58 .. py:function:: model.addInterpolation(Part_doc, Points, StartEdge, EndEdge, IsClosed, IsReordered)
59
60     :param part: The current part object.
61     :param list: A list of points.
62     :param object: Start point.
63     :param object: End point.
64     :param boolean: Is closed.
65     :param boolean: Is reordered.
66     :return: Result object.
67
68 Result
69 """"""
70
71 The result of the operation will be a curve created from the selected shapes:
72
73 .. figure:: images/CreateInterpolation.png
74   :align: center
75
76   Result of the operation.
77
78 **See Also** a sample TUI Script of :ref:`tui_create_interpolation_by_selection` operation.
79
80 Interpolation analytical
81 """"""""""""""""""""""""
82
83 The property panel is shown below.
84
85 .. figure:: images/InterpolationAnalytical.png
86   :align: center
87
88   Create an interpolation analytical
89
90 - **Curves parameters** panel allows to define the mathematical expression for creating the interpolated curve.
91    - **X(t) equation** define the expression of X with t variable.
92    - **Y(t) equation** define the expression of Y with t variable.
93    - **Z(t) equation** define the expression of Z with t variable.
94
95 - **Min t** define the minimun of t.
96
97 - **Max t** define the maximum of t.
98
99 - **Number of steps** define the number of steps.
100
101 **Apply** button creates an interpolation.
102
103 **Cancel** button cancels the operation. 
104
105 **TUI Commands**:
106
107 .. py:function:: model.addInterpolation(Part_doc, xt, yt, zt, mint, maxt, nbSteps)
108
109     :param part: The current part object.
110     :param string: Expression of x.
111     :param string: Expression of y.
112     :param string: Expression of z.
113     :param number: Minimum value of t.
114     :param number: Maximum value of t.
115     :param number: Number of steps. 
116     :return: Result object.
117
118 Result
119 """"""
120
121 The result of the operation will be a curve created from analytical expressions for x,y and z as functions of variable t:
122
123 .. figure:: images/CreateInterpolationAnalytical.png
124   :align: center
125
126   Result of the operation.
127
128 **See Also** a sample TUI Script of :ref:`tui_create_interpolation_analytical` operation.