hm_excludebeyond

Removes entities from the base mark which are beyond the given distance or number of element rows from the entities on the target mark.

Syntax

hm_excludebeyond entity_type_base mark_id_base entity_type_target mark_id_target dist_or_rows_flag dist_or_rows_value

Type

HyperMesh Tcl Query

Description

This API removes entities from the base mark which are beyond the given distance (in model units) or the given number of element rows from the entities on the target mark. If the base mark is empty, it will be filled with every entity in the model that is not a part of the target mark before the entities are excluded.

The exclusion distance can be measured in either model units or in element rows. If dist_or_rows_flag is set to dist, the base entities will be excluded based on the absolute distance away from the target entities measured in model units. If dist_or_rows_flag is set to rows, the base entities will be excluded based on the number of rows of elements they are away from the target entities. Note that for the rows option, the elements used to count the rows must be connected to the target entities and all base entities not attached to the rows of elements will be excluded.

This is very useful for creating morph constraints for boundary layers. It allows you to first select all the nodes in the fluid layer and then use this API to exclude all the elements which lie a certain distance or number of element rows away from the cavity, leaving you with only the nodes inside your boundary layer envelope.

Inputs

entity_type_base
The base entity type. Must be set to nodes.
mark_id_base
The ID of the mark containing the base entities. Valid values are 1 and 2.
entity_type_target
The target entity type. Valid values are nodes and elems.
mark_id_target
The ID of the mark containing the target entities. Valid values are 1 and 2.
dist_or_rows_flag
dist - Exclude based on the absolute distance measured in model units
rows - Exclude based on the number of rows away from the target entities
dist_or_rows_value
The number of model units or elements rows, depending on dist_or_rows_flag.

Examples

To exclude all nodes from mark 1 which are beyond 500.0 model units away from the elements on mark 1:

*createmark nodes 1 "by comp id" 89
*createmark elems 1 "by comp id" 25
hm_excludebeyond nodes 1 elems 1 dist 500.0
To exclude all nodes from mark 1 which are beyond 5 element rows away from the nodes on mark 2:
*createmark nodes 1 "by comp id" 89
*createmark nodes 2 "by comp id" 25
hm_excludebeyond nodes 1 nodes 2 rows 5

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