hm_viewproject
Converts an x,y,z model coordinate to a modeling window coordinate.
Syntax
hm_viewproject x y z
Type
HyperMesh Tcl GUI Command
Description
Converts an x,y,z model coordinate to a modeling window coordinate relative to the upper left hand corner.
Inputs
- x
- The model x-coordinate.
- y
- The model y-coordinate.
- z
- The model 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