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

Description

This command returns the six values defining the bounding box from the specified entities and options:

x_min y_min z_min x_max y_max z_max

The box values are determined depending on the following options.

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.
For assems, this specifies whether to consider nodes/elems, geometry, connectors and/or multibodies/ellipsoids.
For comps, this specifies whether to consider nodes/elems, geometry and/or connectors.
It is ignored for all other entity_types and should be set to 0, but there is no error if bit values are specified that do not correspond to the current entity_type.
The bit values are summed as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3).
Bit0:0 – Do not consider nodes/elems.
  • 1 – Consider nodes/elems.
Bit1:0 – Do not consider geometry.
  • 1 – Consider geometry.
Bit2:0 – Do not consider connectors
  • 1 – Consider connectors.
Bit3:0 – Do not consider multibodies/ellipsoids.
  • 1 – Consider multibodies/ellipsoids.
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.
box_type
The type of bounding box to return. Currently, only a value of 0 is supported, which indicates to return the coordinates of the box oriented along the axes of the specified system.

Examples

To get the bounding box for the displayed elements oriented relative to the global system:

*createmark elems 1 displayed
hm_getboundingbox elems 1 0 0 0

To get the bounding box for the geometry in comps 1-4 oriented relative to rectangular system 100:

*createmark comps 1-4
hm_getboundingbox elems 1 2 100 0

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

11.0