pyux.identify_part - pytha-3d-cad/pytha-lua-api GitHub Wiki

Identifies the part at the given cursor position.

pyui.identify_part(coos_vp, [selection_elements,] [excluded_elements])

Parameters

Type Description
coos_vp {u, v} Normalized viewport coordinates of the mouse cursor.
selection_elements {element_handle_1, ...} Optional: A table of element handles that are exclusively considered in the selection. May be nil.
excluded_elements {element_handle_1, ...} Optional: A table of element handles that are excluded from the selection. May be nil.

Return value

Type Description
element_handle An element handle of the part at the given cursor position.

Notes:

The coos_vp coordinates are solely to be received from one of the mous picking and dragging handler function calls such as set_on_left_click_handler or set_on_left_dragstart_handler.

selection_elements may be nil, in this case all parts are considered in the selection.

See also

pyux, identify_coordinate, identify_plane, set_on_left_click_handler, set_on_right_click_handler, set_on_left_dragstart_handler, set_on_left_dragmove_handler, set_on_left_dragend_handler