hm_projectpointtosegment

Finds the closest point to a specific point on a segment.

Syntax

hm_projectpointtosegment px py pz sx1 sy1 sz1 sx2 sy2 sz2

Type

HyperMesh Tcl Query

Description

Find the closest point to a specific point on a segment.

Inputs

px, py, pz
Defines a point with three coordinate values.
(sx1, sy1, sz1)
(sx2, sy2, sz2)
Defines a segment with two points.
A point on the segment that the point projects.

Example

Hm_projectpointtosegment  0.0  0.0 0.0   -1.0 2.0  0.0  1.0 2.0 0.0 

Result: 0.0 2.0 0.0

Errors

None.