hm_appendmark
Appends entities on a mark based on user supplied options.
Syntax
hm_appendmark entity_type mark_id "?option?" "list"
Type
HyperMesh Tcl Query
Description
This command will place entities of entity_type onto mark mark_id. Valid mark_ids are 1 and 2. Depending on the options specified, the supported entity_type will change.
All options only return entities that are defined as active in the database unless otherwise noted.
If no ?option? is specified, "by name only" is used for entities with names. Otherwise, "by id only" is used.
If no ?option? is specified, both active and inactive entities may be selected.
For options that allow both "ids or names" in the list, entities are found first using names. Entities not found using names are then found using IDs.
The list of IDs, names, or parameters, depending on ?option?, must be quoted, e.g., "1 2 3" or defined using a Tcl list. When specifying entity names that contain spaces, group the name using brackets, e.g., {Comp name with spaces}, or use a Tcl list.
Negative values can be used to find recently created entities.
In addition to the options below, all of the options for hm_createmark are also supported.
Inputs
- "advanced" "by adjacent"
- Starting with entities already on the mark, find entities adjacent to them. The search is performed once.
- "advanced" "by attached"
- Starting with entities already on the mark, find entities adjacent to them. This search is repeated until all adjacent entities are found.
- "advanced" "by face"
- Starting with entities already on the mark, find entities on the same face.
- "advanced" "by face across t junctions"
- Starting with entities already on the mark, find entities on the same face, including those across t-junctions.
Examples
To delete the elements adjacent to the elements in components with names FRONT and SIDE:
hm_createmark elems 1 "by comp name" "FRONT SIDE"
hm_createmark elems 2 "[hm_getmark elems 1]"
hm_appendmark elems 1 "advanced" "by adjacent"
*markdifference elems 1 elems 2
*deletemark elems 1
To translate all of the elements attached to element 40404 by (5,0,0):
hm_createmark elems 1 40404
hm_appendmark elems 1 "advanced" "by attached"
*createvector 1 1.0 0.0 0.0
*translatemark elements 1 1 5
To mark elements that share a face with elements 50 and 100:
hm_createmark elems 1 "50 100"
hm_appendmark elems 1 "advanced" "by face"
Errors
if { [ catch {command_name...} ] } {
# Handle error
}