hm_viewunproject
Converts an x,y,z graphic window coordinate to a modeling windowcoordinate.
Syntax
hm_viewunproject x y z
Type
HyperMesh Tcl GUI
Description
Converts an x,y,z graphic window coordinate, relative to the upper left hand corner, to a modeling window coordinate.
Inputs
- x
- The modeling window x-coordinate.
- y
- The modeling window y-coordinate.
- z
- The modeling window z-coordinate.
Example
To convert a graphic click to a model x,y,z coordinate:
foreach {plane_normal plane_base} [lindex [hm_getplanepanel] 0] {};
foreach {screen_x screen_y} [hm_framework getgraphicsclick] {};
set screen_x [expr $screen_x - [hm_winfo graphicx]];
set screen_y [expr $screen_y - [hm_winfo graphicy]];
set screen_z [lindex [eval hm_viewproject $plane_base] end];
foreach {coord_x coord_y coord_z} [hm_viewunproject $screen_x $screen_y $screen_z] {};
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
13.0