hm_projectpointtosegmentwithangle
Finds the projection point to a specific point on a segment along a specific direction.
Syntax
hm_projectpointtosegmentwithangle px py pz sx sy sz ex ey ez angle unused1 unused2
Type
HyperMesh Tcl Query
Description
Finds the projection point to a specific point on a segment along a specific direction. The result is returned as the point on the straight line that runs from point (px, py, pz) in the calculated direction, and is the point closest to the straight line that runs through points (sx, sy, sz) and (ex, ey, ez).
Inputs
- px, py, pz
- The point.
- sx, sy, sz
- Beginning of the segment.
- ex, ey, ez
- End of the segment.
- angle
- The angle, in degrees, that defines the direction vector in the x-y plane. 0 corresponds to the x-direction and 90 corresponds to the y-direction.
- unused1
- Unused, but must be specified.
- unused2
- Unused, but must be specified.
Example
Find the projection of (0.0, 0.0, 0.0) to the segment defined by points (1.0, -1.0, 0.0) and (1.0, 1.0, 0.0) using an angle of 0 (x-direction):
hm_projectpointtosegmentwithangle 0.0 0.0 0.0 1.0 –1.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0
1.0 0.0 0.0
Errors
None.