hm_getedgeloops2

Returns surface and element boundary entities of specific connection types, and assumes any non-selected entities do not exist.

Syntax

hm_getedgeloops2 entity_type markid=<mark_id> ?looptype=<loop_type>?

Type

HyperMesh Tcl Query Command

Description

Returns the chain of boundary entities of the given type. The return is a "list of loops". Each loop is an ordered list of either surface edge or element node IDs that define each loop. The first value in each loop list is the loop type. For example, a list that starts with number 32 means the list consists of entities (nodes or edges) representing an x-connection type ‘closed’ loop. The remaining values are the ordered node/surface edge IDs defining the loop. If the loop is closed, the first and last ID are the same.

This API is similar to hm_getedgeloops. The difference is that, in defining the connection types at the boundary, hm_getedgeloops takes into account all the elements/surfaces in the model, while hm_getedgeloops2 considers only the given input as if the rest of the model does not exists. Thus, if the edge of a surface is connected to another surface that is not in the input, then that edge is considered to be a ‘free’ edge; i.e. as if it is not stitched to any other edge. In this sense, the boundary entities (nodes or edges) of input entities are classified according to their connection type of being ‘free’, ‘t-connection’ or ‘x-connection’.

For example:

{2 41 36 4 35 39 40 41} closed loop of free type entities

{4 42 67} open loop of t-connection type entities

Inputs

entity_type
The type of entity to query. Valid values are surfaces and elements.
markid=<mark_id>
The ID of the mark containing the entities to query. Valid values are 1 and 2.
looptype=<loop_type>
The type of loop types to find. Bit values are used and the value is calculated as (1*Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4 + 32*Bit5). If not specified, all loop types are returned.
Bit0
0 - Do not consider open free edge loops
1 - Consider open free edge loops
Bit1
0 - Do not consider closed free edge loops
1 - Consider closed free edge loops
Bit2
0 - Do not consider open t-connections
1 - Consider open t-connections
Bit3
0 - Do not consider closed t-connections
1 - Consider closed t-connections
Bit4
0 - Do not consider open x-connections
1 - Consider open x-connections
Bit5
0 - Do not consider closed x-connections
1 - Consider closed x-connections

Examples

Example:

Example

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

2020.1