hm_getboundingbox
Returns the bounding box of the specified entities.
Syntax
hm_getboundingbox entity_type mark_id entity_flag system_id box_type
Type
HyperMesh Tcl Query Command
Description
This command returns the dimensional properties of a bounding box from the specified entities and options.
For box_type set to 0, the returned values are:
x_min y_min z_min x_max y_max z_max
For box_type set to 1, the returned values are:
x_min y_min z_min x_max y_max z_max localx_x localx_y localx_z localy_x localy_y localy_z localz_x localz_y localz_z dim1 dim2 dim3
Inputs
- entity_type
- The type of entity to find the bounding box for. See the list of supported entities for this command.
- mark_id
- The ID of the mark containing the entities. Valid values are 1 and 2.
- entity_flag
- This is a bit value used when entity_type is assems or comps.
- system_id
- The ID of the local coordinate system to return the values relative to. A value of 0 is the global system. Currently only rectangular systems are supported. Ignored if box_type is set to 1.
- box_type
- The type of bounding box to return.
0 - The bounding box is calculated in the global coordinate system, and the minimum and maximum coordinates are returned.
1 - The bounding box is calculated according to the part orientation, and the minimum and maximum coordinates, local axes, and dimensions of the box are returned.
Examples
*createmark elems 1 displayed
hm_getboundingbox elems 1 0 0 0*createmark comps 1 1-4
hm_getboundingbox elems 1 2 100 0*createmark comps 1 5
hm_getboundingbox comps 1 2 0 1Errors
if { [ catch {command_name...} ] } {
# Handle error
}Version History
11.0
2023.1 - Added new box_type value 1.
2026 - Added new dimension values to the command output for box_type set to 1.