*midmesh_repair

Provides various modes/operators to edit midmeshes.

Syntax

*midmesh_repair mode string_array number_of_strings

Type

HyperMesh Tcl Modify Command

Description

This command provides various modes/operators to edit midmeshes. This command assumes the midmesh will be in single component, and the topology is well defined by 1d elements which are also in single component other than the midmesh component.

Inputs

mode
The midmesh mode/operator to use.
Each mode has a different set of required and/or optional string inputs as listed below.
AlignEdgeByLines
Used to align a list of nodes in order with respect to a given list of lines. It will also create 1D elements between the given list of nodes if doesn’t exist.
Valid strings are:
LineList=<list_id>
The ID of the list of lines to align to, created by *createlist. Valid values are 1 and 2.
NodeList=<list_id>
The ID of the list of nodes to be aligned, created by *createlist. Valid values are 1 and 2.
AlignFace
Used to align elements to given surfaces.
Valid strings are:
Elemmark=<mark_id>
The ID of the mark of elements to align. Valid values are 1 and 2.
Surfmark=<mark_id>
The ID of the mark of surfaces to align to. Valid values are 1 and 2.
?lockBoundaryNodes=<mode>?
0 - Do not lock/anchor boundary nodes
1 - Lock/anchor boundary nodes
?useOffset=<value>?
Selected elements will be aligned to this value from the surfaces.
AlignTEdge
Used to align T-connections to the selected surfaces while attempting to maintain the tangency of the faces which are attached to the T-edge but not facing the selected surface.
Valid strings are:
a1DElemmark=<mark_id>
The ID of the mark of 1D elements corresponding to the T-edges. Valid values are 1 and 2.
Surfmark=<mark_id>
The ID of the mark of the surfaces to align to. Valid values are 1 and 2.
CreateMidEdge
Used to create 1D elements linearly interpolated between the selected nodes.
Valid strings are:
Node1=<id>
The ID of the first node to connect by 1D elements.
Node2=<id>
The ID of the first node to connect by 1D elements.
?ElementSize=<value>?
The size of 1D element to be created.
?OutputCompId=<id>?
The ID of the compoent where 1D elements are to be created.
CreateMidEdgeByLines
Used to create 1D elements in the middle of the pair of input guiding surface edges.
If no set of guide edges is selected, 1D elements are created by linearly interpolating between the selected nodes.
If one set of guide edges is selected (either Lines1Mark or Lines2Mark can be used), 1D elements created at an offset distance of the selected nodes from the selected set of guide line(s).
If both sets of guide edges are selected, 1D elements are created in the middle of the pair of guide line(s).
Valid strings are:
Node1=<id>
The ID of the first node to connect by 1D elements.
Node2=<id>
The ID of the first node to connect by 1D elements.
Lines1Mark=<mark_id>
Optional.
The ID of the mark of the first set of surface edge guiding pairs. Valid values are 1 and 2.
Lines2Mark=<mark_id>
Optional.
The ID of the mark of the second set of surface edge guiding pairs. Valid values are 1 and 2.
?ElementSize=<value>?
The size of 1D elements to be created.
?OutputCompId=<id>?
The ID of the compoent where 1D elements are to be created.
DetectIntersections
Detects intersections/overlaps and free edges (gaps) in the provided input elements and groups them into element clusters. The clusters are added as element sets in the model.
Valid strings are:
ElementMark=<mark_id>
The ID of the mark of elements for which intersections/overlaps/free edges (gaps) are to be detected. Valid values are 1 and 2.
?ShowIntersectionLines=<value>?
0 - Do not show intersection lines (default)
1 - Show intersection lines
FillLoop
Used to fill a loop of 1D elements and free edges. Free edges are considered in order to form the desired loop. If unable to detect the loop, it will create temporary 1Ds in sets for the traversed path so as to lay a platform to complete the loop in the subsequent selection.
Valid strings are:
ElemMark=<mark_id>
The ID of the mark of elements on the edges of the desired loop. Valid values are 1 and 2.
delete1D=<value>
Option whether to delete 1Ds which will become internal after fill. 1D elements which will become non-manifold and boundary after fill will not be deleted.
0 - Do not delete
1 - Delete
RepairFace
Used to repair minor problems in the midmesh output automatically, such as intersections, element overlaps, sliver elements and holes, provided the mesh topology is close to the required topology.
Valid strings are:
ElementMark=<mark_id>
The ID of the mark of elements to repair. Valid values are 1 and 2.
?ElementSize=<value>?
The size of 1D and 2D elements to be created.
?OutputComp1Id=<id>?
The ID of the compoent where 1D elements are to be created.
?OutputComp2Id=<id>?
The ID of the compoent where 2D elements are to be created.
SplitByNodeEdge
Used to trim the mesh from node-to edge, creating 1D elements in the path.
Valid strings are:
NodeId=<id>
The ID of the node to use to trim.
a1DElemmark=<mark_id>
The ID of the mark of 1D elements that define the edge. Valid values are 1 and 2.
mode=<value>
The mesh will be trimmed from the given node to the given set of 1D elements by:
1 - Shortest path, using the shortest distance from the given node to the set of given 1D elements
2 - Tangential path, using the tangential direction of the scratch edge connected to the node
3 - Mixed path, similar to tangential path except when the angle of intersection with the selected 1D elements is < 30 degree, it recedes back to an appropriate point from where it uses shortest path to the selected 1D elements
?OutputCompId=<id>?
The ID of the compoent where 1D elements are to be created.
SplitByNodes
Used to trim the mesh from node-to-node, creating 1D elements in the path.
Valid strings are:
SourceNode=<id>
The ID of the first trim node.
TargetNode=<id>
The ID of the second trim node.
?OutputCompId=<id>?
The ID of the compoent where 1D elements are to be created.
string_array
The ID of the string array that contains the additional optional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
Valid parameters and their syntax are given above along with their corresponding mode.
number_of_strings
Integer indicating the size (number of strings) in string_array.

Examples

AlignEdgeByLines:

*createlist nodes 1 296091 308312 308313 308314 122319
*createlist lines 2 13433 13711
*createstringarray 2 "NodeList = 1" "LineList = 2"
*midmesh_repair AlignEdgeByLines 1 2

AlignFace:

*createmark elements 1 775184-775196 775198-775221
*createmark surfaces 1 4458
*createstringarray 4 "Elemmark = 1" "Surfmark = 1" "UseOffset = 2" "lockBoundaryNodes = 1"
*midmesh_repair AlignFace 1 4

AlignTEdge:

*createmark elements 2 641791 641801 641812 641819 641828 641839 641853
*createmark surfaces 1 4458
*createstringarray 2 "a1DElemmark = 2" "Surfmark = 1"
*midmesh_repair AlignTEdge 1 2

CreateMidEdge:

*createstringarray 3 "Node1 = 393803" "Node2 = 397834" "ElementSize = 2" 
*midmesh_repair CreateMidEdge 1 3

CreateMidEdgeByLines:

*createmark lines 1 6825
*createmark lines 2 8525
*createstringarray 6 "Node1 = 327644" "Node2 = 327650" "Lines1Mark = 1" "Lines2Mark = 2" "ElementSize = 2"
*midmesh_repair CreateMidEdgeByLines 1 6

DetectIntersections:

*createmark elements 1 723914 781519
*createstringarray 2 "ElementMark = 1" 
*midmesh_repair DetectIntersections 1 2

FillLoop:

*createmark elements 2 946766 946784 946816-946821
*createstringarray 2 "ElemMark = 2""delete1D = 0"
*midmesh_repair FillLoop 1 2

RepairFace:

*createmark elements 1 723914 781519
*createstringarray 2 "ElementMark = 1" "ElementSize = 2"
*midmesh_repair RepairFace 1 2

SplitByNodeEdge:

*createmark elements 1 644746 765688-765716
*createstringarray 3 "NodeId = 375350" "a1DElemMark = 1" "Mode = 2"
*midmesh_repair SplitByNodeEdge 1 3

SplitByNodes:

*createstringarray 2 "SourceNode=363142" "TargetNode=363179" 
*midmesh_repair SplitByNodes 1 2

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

2019

2019.1 - CreateMidEdge now linearly interpolates between the selected nodes. The CreateMidEdgeWithLines Lines1Mark and Lines2Mark selections are now optional. The behaivor now depends on which, if any, lines marks are populated.