hm_getedgeloops

Returns surface and element free and non-manifold edge loop entities.

Syntax

hm_getedgeloops entity_type markid=<mark_id> ?looptype=<loop_type>? ?featureangle=<angle>? ?refmarkid=<mark_id>? ?restricttoinput=<value>?

Type

HyperMesh Tcl Query

Description

Returns surface and element free and non-manifold edge loop entities. 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. 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.

For example:

{2 1 29 35 34 33 32 31 25 5 4 3 2 1 } {2 6 7 8 9 10 22 23 24 21 18 15 12 30 11 6 } {2 16 19 20 17 16 } {4 26 27 28 } {1 26 39 40 41 28 }

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 + 64*Bit6 + 128*Bit7). 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
Bit6
0 – Do not consider open feature edge loops
1 – Consider open feature edge loops
Bit7
0 – Do not consider closed feature edge loops
1 – Consider closed feature edge loops
featureangle=<angle>
This is relevant to finding feature edges only. When an edge is shared by two surfaces, and the average angle along the edge between these two surfaces is greater than featureangle=<angle>, then it is considered a feature edge. The angle is measured in degrees. The default value is the model’s default feature angle preference.
refmarkid=<mark_id>
A mark containing a set of reference surfaces used in identifying feature edge loops in ambiguous cases. For example, if a feature edge in a loop ends at a vertex at which two other feature edges connected, it is not clear which of the two will be the continuation of this feature edge. In such cases, the one that is shared with a reference surface, or with a surface that is connected to reference surfaces via non-feature edges, is taken as the continuation of the feature edge loop. If reference surfaces are not given, the feature edge loops are terminated when they come to such junctions.
restricttoinput=<value>
0 - Loops are completed naturally for the whole model, which might result in including edges that are not in the input specified by mark_id.
1 - The loop output is restricted to the set of edges that are given by the input only.

Examples

To get all edge loops for the displayed surfaces:

*createmark surfs 1 displayed
hm_getedgeloops surfs markid=1

To get all open t-connection (Bit2) and closed t-connection (Bit3) edge loops for the displayed surfaces:

*createmark surfs 1 displayed
hm_getedgeloops surfs markid=1 looptype=12

To get all closed free (Bit1) edge loops for the displayed elements:

*createmark elems 1 displayed
hm_getedgeloops elems markid=1 looptype=2

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

14.0

2017.1 - Fixed issues where the command would return an extra space at the end of each sublist, and where masked/hidden entities were not being considered even though they were on the input mark.

2019 - Added new looptype Bit6 and Bit7 values. Added new optional arguments featureangle, refmarkid and restricttoinput.