Functions |
|
T-FLEX CAD enables users to create construction lines given by explicit mathematical description. These lines are called functions. A function construction line enables users to define a construction line of virtually any kind. The main condition is the ability to define a construction line as a coordinate functional relationship. To define a function it is necessary to specify its representation type (parametric, explicit etc), the starting and the ending points of the parameter to be measured, different parameters of detailed curve.
The system makes a provision for choosing pre-described functions defining various curves (parabola, evolvent, helix etc). You can also define your own functions manually and use them in the future. In this case you need to create a description file of add new formula and parameters set in the function parameters setting dialog window to the existing one.
The function construction line can be drawn as a polyline or spline.
Defining the Function
The entities defined by a function are input via the command FU: Function Spline
Icon |
Ribbon |
---|---|
Draw → Construct → Function Spline |
|
Keyboard |
Textual Menu |
<FU> |
Construct > Function Spline |
The following options are available to the user:
<Enter> |
Select nearest node or create node defining the function coordinate system |
|
, |
<Ctrl><F> |
Free mode on/off toggle |
|
<N> |
Select Node |
|
<P> |
Set entity Parameters |
<A> |
Select axis of symmetry axis (straight line) |
|
<F4> |
Edit Construction |
|
<Esc> |
Exit command |
Drawing of the given function involves two steps:
1.To define the coordinate system location (XY). With the help of coordinate system you will be able to locate the resulting line in the drawing as required. Coordinate system is set by successive choosing two nodes. The first one defines the point with the coordinates (0; 0). The second one defines the direction of the abscissa axis (X). The ordinate axis (Y) is defined automatically, based on the origin of coordinates and the X axis location.
2.To set the function type and other parameters. That is done in the function parameters setting dialog window popping up after choosing the second node.
You can use two ways to set a functional relationship.
●To use a pre-defined formula from the given set.
●To create a new function.
Users choose the pre-defined functions via a list. The set of pre-defined functions is stored in the file “function.dat”. The file name is defined in the item Function spline files of the command SO: Set System Options tab Files. The file “function.dat” can be edited or replaced, if desired. The parameters in this file are denoted as follows: #1 is the first parameter, #2 is the second one (it is not always needed and is constant for the function calculated). These parameters will be described in detail further on.
After inputting all the function parameters you should close the function parameters dialog by pressing OK. The function line will be drawn.
<Ctrl><F> Free mode on/off toggle option enables users to tie the function coordinate origin point and the point defining the abscissa axis direction to the existing constructions or to specify that in the free drawing mode.
<N> Select Node option enables users to tie function drawing points to the nodes in the object binding off mode.
<P> Set entity Parameters option calls function parameters dialog.
<A> Select axis of symmetry axis (straight line) option enables users to build a function symmetrical to the initial one. After calling the option you should choose a straight construction line and then the initial function by using the option of choosing the spline <S> in case the object binding is on. The function drawn this way will be parametrically connected with the initial one: all the changes in the initial function will be shown symmetrically.
<F4> Edit Construction option enables users to get to the edit mode.
Function Spline Parameters
Following parameters are set in the dialog:
Name. You can choose a standard function name from the list or set a new name for a new function.
Type. You can choose one of the four variants.
●Plain. A Cartesian coordinate system function which sets a low of variation of the ordinate, and the abscissa changes at some pitch in the given range.
●Parametric. A Cartesian coordinate system function which sets a low of variation of both the ordinate and the abscissa.
●Polar. A polar coordinate system function which sets a low of variation of the polar radius and the polar angle changes at some pitch in the given range (in radians).
●Polar Parametric. A polar coordinate system function which sets a low of variation of both the polar radius and the polar angle (in radians).
Y=, X=, P=, A=, The fields for inputting the low of variation for function ordinate and abscissa and for polar radius and angle. In case you choose a function from the list, the fields are filled in automatically. Otherwise you have to fill in the fields according to the syntactical rules.
●Y= - entry field for the variation low of the ordinate.
●X= - entry field for the variation low of the abscissa.
●P= - entry field for the variation low of the polar radius.
●A= - entry field for the variation low of the polar angle (in radians).
●«#1» – the first parameter of the function.
- For the Plain function type it is the variable of abscissa variation (in millimeters in the given range).
- For the Parametric function type it is the parameter for Y= and X= fields, which varies in the given range.
- For the Polar function type it is the variable of polar angle variation (in radians in the given range).
- For the Polar Parametric function type it is the parameter for P= and A= fields which varies in the given range.
- In case you choose the values from the database field it is the variable of the database line number.
● «#2» denotes the second parameter of the function. It is the distance between the nodes defining the coordinate system. When calculating function line it is constant. If the distance between the nodes changes, the constant #2 changes too.
●«*» - multiplication, «/» - division, «**» - powering.
●«+» - addition, «-» - subtraction.
●Point divides the integral and the fractional parts.
●Two variables can be used in one function or in one field if necessary.
●Variable names of the document can be input in the fields considered, but the function variable name is always «#1».
●Variable editor function denotations can be used in the fields considered.
●A selection of values from the database can be used in the fields considered. An expression «q.#» which returns the number of the last line in the database «q» can be used as a finite value index (final entry in the database «q»).
In this case the parameter «#1» will define the database line number.
Start and Finish. Set the variation range of the function parameter #1.
Symmetry About Axis X. Option flag enables users to create a symmetrical reflection of the line drawn relative to the X axis of the function coordinate system.
Scale of Axis X and Scale of Axis Y. These parameters enable users to change the scale of each of the function coordinate system axes. The coordinate of every point used for drawing the function curve is multiplied by the corresponding scale factor.
Change on Transformation. Setting the option on enables an automatic change of scale when scaling transformation is performed on the function curve (when copying or moving). Setting the option off disables automatic scaling relative to the axis.
Polyline generation group. This function can represent a polyline or a spline drawn based on the polyline. This group defines the parameters of the polyline.
Equal steps. The function parameter changes from the start value to the end one at a constant pitch.
Number of steps. The number of steps determines the number of polyline segments: the number of points (equal to the number of steps) is always one point more than the number of segments.
If polyline point coordinates are calculated using a database, the value of the variable parameter is usually the line number in the database. In this case, the current value of the variable parameter is replaced by the largest integer less than or equal to it. As a result, data could come at uneven steps from the database. To avoid this, always define the function parameters in such a way that the number of steps was equal to the difference between the end and the start values of the variable parameter.
Optimized to curvature. Enables users to obtain a more frequent division into segments at the intervals with higher curvature.
Tolerance. Determines a maximum possible deviation of the calculated polyline coordinates from the coordinates of the real curve when using the Optimized to curvature option.
Generate Spline from polyline group. Setting the flag on transforms the function line from a polyline into a spline drawn basing on it.
Open. The first and the last points of the spline correspond to the calculated abscissa and ordinate of the function at the start and end values of the function variable «#1».
Closed. The first and the last points of the function (if the function is not a closed curve) are connected by a spline interval.
Construction line parameters group.
Level. Moves the function line to a certain level of visibility.
Layer. Layer name which the function line belongs to.
Color. Defines the function line color.
Editing Function Spline
There are two ways to enter the function editing mode.
To choose a function line with .
To call a function line context menu with and choose the command:
|
Edit Construction |
When editing you can redefine the nodes setting the coordinate system. Choose the node with and set its new location.
When editing the following options are available in the automenu:
|
<P> |
Set entity Parameters |
<V> |
Dynamic model regeneration mode |
|
<O> |
Create name for selected Element |
|
<I> |
Select Other Element |
|
<Del> |
Delete selected Element(s) |
|
<Esc> |
Cancel selection |
All the function parameters are available for editing in the element parameters dialog <P> Set entity Parameters.