*group_matches
Groups parts into partsets based on matching shapes.
Syntax
*group_matches entity_type mark_id reference_entity_type reference_mark_id string_array number_of_strings
Type
HyperMesh Tcl Modify Command
Description
Groups parts into partsets based on matching shapes.
Similar shapes are grouped into to a single partset. A parent partset is created for all different partsets. Unmatched partsets can optionally be put in a new partset. Also see hm_getmatching to find and group but not create partsets.
Inputs
- entity_type
- The type of entity to group. Must be set as modules/parts.
- mark_id
- The ID of the mark containing the entities to group. Valid values are 1 and 2.
- reference_entity_type
- The type of entity to use as reference. Must be set as modules/parts.
- reference_mark_id
- The ID of the mark containing the reference entities, if any. Valid values are 1 and 2. If the mark is empty, grouping is done by finding similar shapes within all input entities.
- string_array
- The string array ID that contains the additional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
- number_of_strings
- Integer indicating the size (number of strings) in the string array created using *createstringarray.
Examples
To group all parts by area without any
reference:
*createmark parts 1 all
*createmark parts 2
*group_matches parts 1 parts 2
To group all parts by area using part 232 as the
reference:
*createmark parts 1 all
*createmark parts 2 232
*group_matches parts 1 parts 2
To group all parts by shape without any reference, using a custom parent partset
name:
*createmark parts 1 all
*createmark parts 2
*createstringarray 1 "method=Shape parentpartsetname=%searchMethod_%deformationTolerance"
*group_matches parts 1 parts 2 1 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
2021