hm_projectpointonsegment
Returns the closest point to a specific point on a finite segment.
Syntax
hm_projectpointonsegment px py pz sx1 sy1 sz1 sx2 sy2 sz2
Type
HyperMesh Tcl Query Command
Description
Returns the closest point to a specific point on a finite segment.
Inputs
- px, py, pz
- Defines a point with three coordinate values.
- sx1, sy1, sz1
- The segment start point.
- sx2, sy2, sz2
- The segment end point.
Examples
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
Incorrect usage results in a Tcl error. To detect
errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2021