hm_getcog

Returns the mass center-of-gravity coordinates for the selected entities.

Syntax

hm_getcog entity_type mark_id

Type

HyperMesh Tcl Query Command

Description

Returns the mass center-of-gravity coordinates for the selected entities. The coordinates are always returned relative to the global axes.

Inputs

entity_type
The type of entity to query. Currently supported for comps and elems.
mark_id
The ID of the mark containing the entities. Valid values are 1 and 2.

Example

To get the COG for components 1-5:

*createmark comps 1 1-5
hm_getcog comps 1

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.101