*batchmesh_mc
Meshes geometry using BatchMesh mesh controls.
Syntax
*batchmesh_mc mark_id entity_type entity_mark_id options
Type
HyperMesh Tcl Modify
Description
Meshes geometry using BatchMesh mesh controls.
Currently, to undo this command, call *rejectbatchmesh with no parameters. Reject is possible only if Bit0 is set to 0 for the options argument. Undo is also not possible after any other command is called.
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.
- entity_mark_id
- The ID of the mark containing the model control on-the-fly selection. Valid values are 1 and 2.
- options
- A flag that indicates the advanced options. Bit values are used and the value is
calculated as (1*Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4 + 32*Bit5 + 64*Bit6 +
128*Bit7).
- Bit0: Allow reject.
- 0 – Save model to allow reject.
- 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.
- Bit2: Mesh connectivity.
- 0 – Keep connectivity with existing mesh.
- Bit3: Mesh controls order.
- 0 – Apply mesh controls by element size.
- Bit4: Intermediate rollback.
- 0 – Do not allow intermediate rollback.
- Bit5: Intermediate rollback data.
- Valid only when Bit4 is 1.
- Bit6: Plot elements.
- 0 – Keep plot elements.
- Bit7: Delete elements unassociated to geometry.
- 0 – Keep unassociated elements.
Examples
*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.
#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
- 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
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
14.0