*hm_batchmesh2

Performs interactive BatchMeshing.

Syntax

*hm_batchmesh2 entity_type mark_id string_array number_of_strings criteria_file param_file

Type

HyperMesh Tcl Modify

Description

Performs interactive BatchMeshing.

Currently, to undo this command, call *rejectbatchmesh with no parameters. Reject is possible only if the save_model string parameter is omitted or set to 1. Undo is also not possible after any other command is called.

Inputs

entity_type
The entity type to perform the BatchMeshing for. Valid values are surfs and comps.
mark_id
The ID of the mark containing the entities to mesh. Valid values are 1 and 2.
string_array
The ID of the string array that contains the additional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
Each string must be space and/or = separated between the name and value. Strings can be grouped in any manner, and can appear in any order.
Valid strings are:

MESH AND GEOMETRY CLEANUP PARAMETERS ( AUTOGENERATION )

elem_size=<size>
The target element size.
If set as a positive value, then the criteria_file and param_file arguments are either scaled if params_generate_mode is set to "scale", or ignored and the criteria and parameter values are auto-generated using some default values adjusted to the given size.
The following mesh and geometry cleanup strings have an effect only if elem_size is specified and has a valid value.
params_generate_mode=<mode>
Defines the auto-generate mode. Valid values are:
generic - Generic, universal parameters are created (default)
scale - The given criteria_file and param_file files are scaled to elem_size.
midmesh - Parameters specialized for shell models obtained by mid-surface extraction are created
shell - Parameters specialized for shell models are created
solid - Parameters specialized for solid models are created
min_elem_size=<size>
The minimum element size, used for quality criteria auto-generation. Default is 0.3*elem_size.
max_elem_size=<size>
The maximum element size, used for quality criteria auto-generation. Default is 1.75*elem_size.
elem_type=<type>
0 - Trias
1 - Quads
2 - Mixed (default)
elem_order=<order>
1 - First (default)
2 - Second
elem_feature_angle=<angle>
The minimum angle, in degrees, between elements for feature element edges. Default 25.
no_geomcleanup=<mode>
0 - Geometry cleanup is applied (default)
1 - Geometry cleanup is not applied

The following geometry cleanup strings have an effect only if no_geomcleanup is 0.

no_remove_holes=<mode>
0 - Small hole removal during geometry cleanup is enabled (default). The default diameter for removal is max(0.4*elem_size, 0.8*min_elem_size).
1 - Small hole removal during geometry cleanup is disabled.
no_seed_holes=<mode>
0 - Holes seeding with fixed points during geometry cleanup is enabled (default).
1 - Holes seeding with fixed points during geometry cleanup is disabled.
no_washer=<mode>
0 - Washer creation is enabled (default).
1 - Washer creation is disabled.
no_node_move_across_edges=<mode>
0 - Nodes are allowed to be moved across non-feature geometry edges (default).
1 - Nodes are not allowed to move off geometry edges.
no_advkeepfeatures=<mode>
0 - Advanced feature capturing is enabled (default).
1 - Advanced feature capturing is disabled.

breakconnectivity=<mode>
0 - Mesh connectivity is maintained with parts of the model not selected (default).
1 - Mesh connectivity is broken with parts of the model not selected.
keep_plotelems=<mode>
0 - Plot elements are deleted. This is how standalone Batchmesher behaves.
1 - Plot elements are not deleted (default).

batchtempfilesmode=<mode>
0 - Temp files are not created (default). This improves performance but internal rollback of failed steps is not possible.
1 - Temp files are created in a temp directory and removed after command completion. This decreases performance but allows internal rollback of failed steps.
2 - Temp files are created in a temp directory and kept after command completion. This decreases performance but allows internal rollback of failed steps.
save_model=<mode>
0 - A backup model is not saved and reject of the command is not possible.
1 - A backup model is saved with an auto-generated name with the prefix batchmeshbackup, and reject of the command is possible (default).
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.
criteria_file
The full path and file name of the criteria file. If the criteria are set by a preceding command, "dummy" can be used.
This is ignored if params_generate_mode is set in the strings input.
param_file
The full path and file name of the parameter file. If the params are set by a preceding command, "dummy" can be used.
This is ignored if params_generate_mode is set in the strings input.

Examples

BatchMesh surfaces 36 and 79 using the criteria file C:/crit/10mm.criteria and parameters file C:/crit/10mm.param, with all other default parameters:
*createmark surfs 1 36 79
*hm_batchmesh2 surfs 1 1 0 "C:/crit/10mm.criteria" "C:/crit/10mm.param"
BatchMesh surfaces 36 and 79 using the criteria file C:/crit/10mm.criteria and parameters file C:/crit/10mm.param, breaking mesh connectivity, with all other default parameters:
*createmark surfs 1 36 79
*createstringarray 1 "breakconnectivity = 1"
*hm_batchmesh2 surfs 1 1 0 "C:/crit/10mm.criteria" "C:/crit/10mm.param"
BatchMesh surfaces 36 and 79 with element size 8.0 and minimum size 3.75. Use auto-generated shell criteria and parameters. Allow internal reject steps via temp files:
*createmark surfs 1 36 79
*createstringarray 2 "elem_size = 8 min_elem_size = 3.75 params_generate_mode = shell" "batchtempfilesmode = 1"
*hm_batchmesh2 surfs 1 1 2 "dummy" "dummy"
BatchMesh surfaces 36 and 79 with element size 7.0, using scaling of the criteria C:/crit/10mm.criteria and parameters file C:/crit/10mm.param. Do not output temporary files to allow internal reject:
*createmark surfs 1  36 79
*createstringarray 2 "elem_size = 7.0 params_generate_mode = scale" "batchtempfilesmode = 0"
*hm_batchmesh2 surfs 1 1 2 "C:/crit/10mm.criteria" "C:/crit/10mm.param"

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