*batchmesh_mc

Meshes geometry using BatchMesh mesh controls.

Syntax

*batchmesh_mc mark_id entity_type entity_mark_id options

Type

HyperMesh Tcl Modify Command

Description

Meshes geometry using BatchMesh mesh controls.

Inputs

mark_id
The ID of the mark containing the mesh controls to use. Valid values are 1 and 2.
entity_type
The entity type for the model control on-the-fly selection. Valid values are surfaces, comps and regions.
This is ignored, if the model control selection is set directly in the model mesh control.
entity_mark_id
The ID of the mark containing the model control on-the-fly selection. Valid values are 1 and 2.
This is ignored, if the model control selection is set directly in the model mesh control.
options
A flag that indicates the advanced options. Bit values are used and the value is calculated as (2*Bit1 + 4*Bit2 + 8*Bit3 + 64*Bit6 + 128*Bit7).
Bit1: Overlapping selection behavior.
0 - Allow overlapping selections. The first mesh control referencing the entity is used and that entity is ignored in subsequent mesh controls.
1 - Do not allow overlapping selections and return an error.
Bit2: Mesh connectivity.
0 - Keep connectivity with existing mesh.
1 - Break connectivity with existing mesh.
Bit3: Mesh controls order.
0 - Apply mesh controls by element size.
1 - Apply mesh controls by increasing ID.
Bit6: Plot elements.
0 - Keep plot elements.
1 - Delete plot elements before meshing.
Bit7: Delete elements unassociated to geometry.
0 - Keep unassociated elements.
1 - Delete unassociated elements before meshing.

Examples

BatchMesh the components 1 and 2, using a first order mixed mesh, keeping any adjacent existing elements with criteria file C:/batch_criteria/crash_10mm.criteria and parameters file C:/batch_criteria/crash_10mm.param:
*createentity meshcontrols config=MCBM_CFG_BATCHMESH_GLB name=main_mc
*setvalue meshcontrols name=main_mc MCBM_ENTITY_SEL={comps 1 2} MCBM_MODE_CBX=0 MCBM_CRITERIA_FILE="C:/batch_criteria/crash_10mm.criteria" MCBM_PARAMS_FILE="C:/batch_criteria/crash_10mm.param"
*createmark meshcontrols 1 $main_mc_name
*batchmesh_mc 1 comps 1 0

BatchMesh the components Main_Body, Medium and Detailed, using a first order mixed mesh, keeping any adjacent existing elements.

Mesh component Main_Body with criteria file C:/batch_criteria/crash_10mm.criteria and parameters file C:/batch_criteria/crash_10mm.param.

Mesh component Medium with element size 7.0, scaling the criteria and parameters from C:/batch_criteria/crash_5mm.criteria and C:/batch_criteria/crash_5mm.param.

Mesh component Detailed with auto generated criteria and parameters with element size 4.0, min element size 2.0 and max element size 6.5. Use defaults for all other auto-generation options.
#Create a global mesh control for all comps
set main_id [hm_getvalue comps name=Main_Body dataname=id]
set medium_id [hm_getvalue comps name=Medium dataname=id]
set detailed_id [hm_getvalue comps name=Detailed dataname=id]

set main_mc_name "main_mc"
*createentity meshcontrols config=MCBM_CFG_BATCHMESH_GLB name=$main_mc_name
*setvalue meshcontrols name=$main_mc_name MCBM_ENTITY_SEL={comps $main_id $medium_id $detailed_id} MCBM_MODE_CBX=0 MCBM_CRITERIA_FILE="C:/batch_criteria/crash_10mm.criteria" MCBM_PARAMS_FILE="C:/batch_criteria/crash_10mm.param"

#Create a local mesh control for Medium
set medium_mc_name "medium_mc"
*createentity meshcontrols config=MCBM_CFG_BATCHMESH name=$medium_mc_name
*setvalue meshcontrols name=$medium_mc_name MCBM_ENTITY_SEL={comps $medium_id} MCBM_MODE_CBX=1 MCBM_ELEM_SIZE=7.0 MCBM_CRITERIA_FILE="C:/batch_criteria/crash_5mm.criteria" MCBM_PARAMS_FILE="C:/batch_criteria/crash_5mm.param"

#Create a local mesh control for Detailed
set detailed_mc_name "detailed_mc"
*createentity meshcontrols config=MCBM_CFG_BATCHMESH name=$detailed_mc_name
*setvalue meshcontrols name=$detailed_mc_name MCBM_ENTITY_SEL={comps $detailed_id} MCBM_MODE_CBX=2 MCBM_ELEM_SIZE=4.0 MCBM_MIN_ELEM_SIZE=2.0 MCBM_MAX_ELEM_SIZE=6.5

#Create the mesh from the 3 mesh controls.  The comps selection is not required since the entity selection is defined already.
*createmark meshcontrols 1 $main_mc_name $medium_mc_name $detailed_mc_name
*batchmesh_mc 1 comps 1 0
BatchMesh all surfaces with criteria and parameters C:/batch_criteria/crash_12mm.criteria and C:/batch_criteria/crash_12mm.param with the following exceptions:
  • Surfaces with IDs 78, 134 and 163 should be meshed with criteria and parameters C:/batch_criteria/crash_8mm.criteria and C:/batch_criteria/crash_8mm.param
  • Regions with IDs 2 and 5 should be meshed with criteria and parameters C:/batch_criteria/crash_5mm.criteria and C:/batch_criteria/crash_5mm.param
#Global mesh control for 12mm mesh
set glob_mc_name "part_mc"
*createentity meshcontrols config=MCBM_CFG_BATCHMESH_GLB name=$glob_mc_name
*setvalue meshcontrols name=$glob_mc_name MCBM_ENTITY_SEL={comps 0} MCBM_MODE_CBX=0 MCBM_CRITERIA_FILE="C:/batch_criteria/crash_12mm.criteria" MCBM_PARAMS_FILE="C:/batch_criteria/crash_12mm.param"

#Local mesh control for 8mm mesh
set mc8mm_name "mc_8mm"
*createentity meshcontrols config=MCBM_CFG_BATCHMESH name=$mc8mm_name
*setvalue meshcontrols name=$mc8mm_name MCBM_ENTITY_SEL={surfs 78 134 163} MCBM_MODE_CBX=0 MCBM_CRITERIA_FILE="C:/batch_criteria/crash_8mm.criteria"  MCBM_PARAMS_FILE="C:/batch_criteria/crash_8mm.param"

#Local mesh control for 8mm mesh
set mc5mm_name "mc_5mm"
*createentity meshcontrols config=MCBM_CFG_BATCHMESH name=$mc5mm_name
*setvalue meshcontrols name=$mc5mm_name MCBM_ENTITY_SEL={regions 2 5} MCBM_MODE_CBX=0 MCBM_CRITERIA_FILE="C:/batch_criteria/crash_5mm.criteria"  MCBM_PARAMS_FILE="C:/batch_criteria/crash_5mm.param"

#Create the mesh from the 3 mesh controls.  The surfs selection is required since the global control entity selection is not defined.
*createmark meshcontrols 1 $glob_mc_name $mc8mm_name $mc5mm_name
*createmark surfs 1 all
*batchmesh_mc 1 surfs 1 0

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

2020 - This command is now supported for global history. Bit0 is deprecated and all values allow reject. Bit4 is deprecated and all values do not allow intermediate rollback. Bit5 is deprecated and all values do not generate intermediate models or log files.