1 .. |feature_interpolation.icon| image:: images/feature_interpolation.png
6 Interpolation feature creates an interpolated curve (edge) based on existing points/vertices or based on analytical mathematical expression.
8 To create an interpolation in the active part:
10 #. select in the Main Menu *Build - > Interpolation* item or
11 #. click |feature_interpolation.icon| **Interpolation** button in the toolbar
13 There are two creation modes of an interpolation:
15 .. figure:: images/feature_interpolation_by_selection.png
19 Interpolation by selection
21 .. figure:: images/feature_interpolation_analytical.png
25 Interpolation analytical
27 Interpolation by selection
28 """"""""""""""""""""""""""
29 The property panel is shown below.
31 .. figure:: images/Interpolation.png
34 Create an interpolation by selection
36 Select one or several vertices or points in the viewer.
38 - **Closed** makes the interpolation curve closed.
40 - **Reorder** reorders the selected points to minimize the length of curve.
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.
44 **Apply** button creates an interpolation.
46 **Cancel** button cancels the operation.
50 .. py:function:: model.addInterpolation(Part_doc, Points, IsClosed, IsReordered)
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.
58 .. py:function:: model.addInterpolation(Part_doc, Points, StartEdge, EndEdge, IsClosed, IsReordered)
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.
71 The result of the operation will be a curve created from the selected shapes:
73 .. figure:: images/CreateInterpolation.png
76 Result of the operation.
78 **See Also** a sample TUI Script of :ref:`tui_create_interpolation_by_selection` operation.
80 Interpolation analytical
81 """"""""""""""""""""""""
83 The property panel is shown below.
85 .. figure:: images/InterpolationAnalytical.png
88 Create an interpolation analytical
90 Select one or several vertices or points in the viewer.
92 - **Curves parameters** panel allows to define the mathematical expression for creating the interpolated curve.
93 - **X(t) equation** define the expression of X with t variable.
94 - **Y(t) equation** define the expression of Y with t variable.
95 - **Z(t) equation** define the expression of Z with t variable.
97 - **Min t** define the minimun of t.
99 - **Max t** define the maximum of t.
101 - **Number of steps** define the number of steps.
103 **Apply** button creates an interpolation.
105 **Cancel** button cancels the operation.
109 .. py:function:: model.addInterpolation(Part_doc, xt, yt, zt, mint, maxt, nbSteps)
111 :param part: The current part object.
112 :param string: Expression of x.
113 :param string: Expression of y.
114 :param string: Expression of z.
115 :param number: Minimum value of t.
116 :param number: Maximum value of t.
117 :param number: Number of steps.
118 :return: Result object.
123 The result of the operation will be a curve created from analytical expressions for x,y and z as functions of variable t:
125 .. figure:: images/CreateInterpolationAnalytical.png
128 Result of the operation.
130 **See Also** a sample TUI Script of :ref:`tui_create_interpolation_analytical` operation.