*mm_align
Edits or aligns the midmesh.
Syntax
*mm_align command=<value> ?option1=<value1>? ?option2=<value2>? … ?optionN=<valueN>? ?save_flag?
Type
HyperMesh Tcl Modify Command
Description
Edits or aligns the midmesh. Also provides the method to initialize the required data object and clean it after the performed operation.
Inputs
- command=<value>
- The command that needs to be executed. Valid values are:
- aligntype=<value>
- The type of alignment to be performed to a midmesh surface. Valid only when command=edit and entitytype=surfaces. Valid values are mid, cylinder, plane and offset.
- alignUnder={<id1> <id2> … <idN>}
- The list of ids of solids lines under which to align a midmesh edge. Valid only when entitytype=lines.
- axis={x y z}
- The components of the vector of axis of cylinder. Valid only when aligntype=cylinder.
- base={x y z}
- The coordinates of the base point of cylinder or the plane. Valid only when aligntype=cylinder or aligntype=plane.
- copy=<value>
- Edit input surfaces by copying the aligntype and definitions of target surface with given id. Valid only when entitytype=surfaces.
- entitylist={<id1> <id2> … <idN>}
- The list of entity IDs that are passed as selection. Applicable only when command is set to correct_extrusions.
- entitymark=<mark_id>
- The mark of entities that are passed as selection. Applicable only when command is set to correct_extrusions. Valid values are 1 and 2.
- entitytype=<value>
- The type of entities that are passed as selection. Applicable only when command=correct_extrusions. Valid values are surfaces and components.
- fuseEdge0={<id1> <id2> … <idN>}
- fuseEdge1={<id1> <id2> … <idN>}
- The lists denoting the two chains of midmesh edges that need to be fused. Valid only when aligntype=collapse.
- guideSurfs={<id1> <id2> … <idN>}
- The list of ids of solids surfaces to align a boundary midmesh edge against. Valid only when entitytype=lines.
- merge=<value>
- Applicable only when command is set to correct_extrusions. Valid values are true (default) and false. If set to true, small surfaces are merged with neighboring larger surfaces, and minor edges are suppressed.
- normal={x y z}
- The components of the vector of normal of plane. Valid only when aligntype=plane.
- offset=<value>
- The offset value to align midmesh surfaces against solid surfaces provided in uniformOffsetSurfs. Valid only when aligntype=offset.
- radius=<value>
- The radius value of cylinder. Valid only when aligntype=cylinder.
- remesh=<value>
- Valid values are true (default) and false. Perform re-mesh of the affected faces at the end of any alignment operation, if true.
- side0Surfs={<id1> <id2> … <idN>}
- side1Surfs={<id1> <id2> … <idN>}
- The solid surfaces that guide a midmesh surface, provided as list of IDs. Valid only when aligntype=mid.
- uniformOffsetSurfs={<id1> <id2> … <idN>}
- A single side of solid surfaces that guide a midmesh surface, provided as list of ids. Must be accompanied by offset=value. Valid only when aligntype=offset.
- save_flag
- To retrieve saved entities to use as input instead of entitymark or entitylist. Valid value is savedentities.
Examples
To automatically correct an extruded midmesh:
*createmark surfs 1 displayed
*mm_align command=correct_extrusions entitytype=surfs entitymark=1To align the given surfaces into the middle of surface with ID 17774 on one side and
surfaces with ID 18244 and 18511 on the other, merging equivalent faces and avoiding
remeshing the
result:
*createmark surfaces 1 19212 19221 19231
*mm_align edit entitytype=surfs entitymark=1 aligntype=mid side0Surfs={17774} "side1Surfs={18244 18511}" merge=1 remesh=0To copy the definition of surface with ID 608 onto surfaces with ID 602 and 609 and correct
them and merge with surface ID
608:
*createmark surfaces 1 602 609
*mm_align command=edit entitytype=surfs entitymark=1 copy=608 merge=1To make surfaces with ID 614 and 638 cylindrical with axis passing through (3.5, 2.4, -4.1)
and point to x axis, with radius
10:
*createmark surfaces 1 614 638
*mm_align command=edit entitytype=surfs entitymark=1 aligntype=cylinder "base={3.5 2.4 -4.1}" "axis={1.0 0.0 0.0}" radius=10To make surfaces with IDs 603-607 uniformly offset from solid surface with ID 76 with
offset 4:
*createmark surfaces 1 603-607
*mm_align command=edit entitytype=surfs entitymark=1 aligntype=offset uniformOffsetSurfs={76} offset=4To fuse edges with ID 1693 and
1647:
*mm_align command=collapse fuseEdge0={1693} fuseEdge1={1647}To change surface with ID 747 into a
plane:
*createmark surfaces 1 747
*mm_align command=edit entitytype=surfs entitymark=1 aligntype=plane "base={410.5 57 -60.0}" "axis={0.000000 0.406738 0.913545}"To extend line with ID 1736 on to the solid to meet surface with ID
504:
*createmark lines 1 1736
*mm_align command=edit entitytype=lines entitymark=1 guideSurfs={504}To align edges saved by the user (using save selection) under the solid edge with ID
1085:
*mm_align command=edit entitytype=lines savedentities alignUnder={1085}To automatically correct an extruded midmesh without merging small surfaces to
neighbors:
*mm_align command=correct_extrusions entitytype=surfs entitylist={1 2} merge=falseErrors
Incorrect usage results in a Tcl error. To detect
errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}Version History
2025
2026 - Added new command values “edit” and “collapse”. Removed command values “begin” and “end”.