hm_getcog
Returns the mass center-of-gravity coordinates for the selected entities.
Syntax
hm_getcog entity_type mark_id ?reserved_1? ?reserved_2? ?lumpedmassflag? ?system_id?
Type
HyperMesh Tcl Query Command
Description
Returns the mass center-of-gravity coordinates for the selected entities.
Inputs
- entity_type
- The type of entity to query. Currently supported for comps, elems, mats, props, parts, assems, plies and laminates.
- mark_id
- The ID of the mark containing the entities. Valid values are 1 and 2.
- reserved_1
- Reserved for future use. Must be set to 0.
- reserved_2
- Reserved for future use. Must be set to 0.
- lumpedmassflag
- Specifies whether to include lumped mass in the COG calculations.
- system_id
- The ID of the system to report the COG values relative to.
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
2021.2 - Added new supported entity types mats, props, parts, assems, plies, and laminates.
2022.3 - Added new optional arguments lumpedmassflag and system_id.