hm_getsurfaceuvatcoordinate

Returns the nearest surface u,v coordinate from a given x, y, z location.

Syntax

hm_getsurfaceuvatcoordinate surface_id x y z

Type

HyperMesh Tcl Query Command

Description

Returns the nearest surface u,v coordinate from a given x, y, z location.

The coordinate is projected to the nearest point on the input surface and returns its normalized u, v coordinates, the coordinates of the projected point and a string specifying the position of the projected point on the surface. The returned string can be one of:
  • Point snapped to Edge
  • Point snapped to Edge End
  • Point snapped to Edge Start
  • Point snapped interior to the Surface
  • Point snapped to Vertex

Inputs

surface_id
The ID of the surface to query.
x
The x coordinate of the point.
y
The y coordinate of the point.
z
The z coordinate of the point.

Examples

To query the u,v coordinate of the point (1702.4653, 403.6108, 777.5562) projected on surface 26:
hm_getsurfaceuvatcoordinate 26 1702.4653 403.6108 777.5562

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

2020