Parameterization


Any geometrical object parameter can be defined through a variable or mathematical expression. The method allows making additional parametrical links between elements or contours.

The parameters list is on the <Parameters> tab:

 

f_clip0795

 

The parameter name is in the <Name> field. A new name input adds the new parameter in the list. The parameter value is shown in the <Value> field and it can be edited. The parameter value can be defined by a mathematical expression which is in the <Expression> field. The expression can contain other parameters and mathematical functions. The parameter value will be calculated automatically if the expression is defined.

There is an example description. The project can be found among of standard examples of SprutCAM. The file name is Clock_2D.stc. Contours of the clock dial were constructed in the <2D Geometry> mode. The <H> parameter means hours and the <Min> parameter signifies minutes. During construction <H> was initialized by the 10 value and <Min> was initialized by 10 too.

The <H_dgr> and <Min_dgr> parameters mean angle values for the hour-hand and minute-hand correspondingly. The parameters values are calculated by expressions and they depend of the <H> and <Min> parameters values.

 

f_clip0796

 

When <H> and <Min> parameters values equal to 10 hours and 10 minutes correspondingly then the left picture one can see in the graphical window:

 

clock-1

 

But if the values are modified <H> to 1 hour and <Min> to 30 minutes then an image in the graphical window is modified too and the right picture will be visible.

 

clock-2

 

 

 

See also:

Environment of 2D geometrical constructions