PATH
Parameters and functions
"Optional title"
pathid
$x_1$, $y_1$, $z_1$
.
$x_{\mathrm{n}}$, $y_{\mathrm{n}}$, $z_{\mathrm{n}}$
Parameter definition
Description
This command defines a path in space as a sequence of points connected by straight segments. The path can then be reused by other commands that need a geometric reference, for example OUTPUT_SENSOR_PATH or INITIAL_MATERIAL_DIRECTION_PATH.
A path may be split into several segments by setting the local x-coordinate to $1.0E20$ at a break point. This is useful when the downstream command should follow piecewise path branches rather than one continuous polyline.
Example
Part following a path
An example of a part that is instructed to follow a path with the use of the built-in python module. For further information, see Impetus Engine module.
6 points in space define the path with ID=12345. To instruct the part to follow the path, it is given a prescribed displacement defined by three functions (X-, Y- and Z-direction) specified in a python script. With the python module: impetus.path, the X-, Y- and Z-coordinates of the path is returned using relative positions.
Python script path.py:
# Import the impetus module
import impetus
# Path example (using relative position)
def x(t):
x = impetus.path(12345, t, 1)
return x[0]
def y(t):
x = impetus.path(12345, t, 1)
return x[1]
def z(t):
x = impetus.path(12345, t, 1)
return x[2]