PATH

Parameters and functions

*PATH
"Optional title"
pathid
$x_1$, $y_1$, $z_1$
.
$x_{\mathrm{n}}$, $y_{\mathrm{n}}$, $z_{\mathrm{n}}$

Parameter definition

Variable
Description
pathid
Path ID
$x_1$, $y_1$, $z_1$
First point in space
.
$x_{\mathrm{n}}$, $y_{\mathrm{n}}$, $z_{\mathrm{n}}$
Last point in space

Description

This command is used to define a path in space.

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.

*UNIT_SYSTEM SI *TIME 1, , , 0.001 *COMPONENT_BOX 1, 1, 1, 1, 1 0, 0, 0, 0.5, 0.5, 0.5 *MAT_RIGID 1, 1000.0 *PART 1, 1 *SCRIPT_PYTHON path.py *BC_MOTION "follow path" 1 P, 1, 0, XYZ D, X, 1001 D, Y, 1002 D, Z, 1003 *FUNCTION 1001 path.x(t) *FUNCTION 1002 path.y(t) *FUNCTION 1003 path.z(t) *PATH 12345 0, 0, 0 1, 0, 0 1, 1, 0 0, 1, 1 0, 0, 1 1, 0, 1 *END

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]