Extracts the midmesh of an input geometry.
Syntax
*midmesh_extract
entity_type mark_id string_array number_of_strings
Type
HyperMesh Tcl Modify Command
Description
longDescription
Inputs
-
entity_type
- The type of input geometry. Valid values are solids, surfs, comps and elems.
-
mark_id
- The ID of the mark of input entities. Valid values are 1 and 2.
-
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.
- Note: All parameters are case insensitive, and order insensitive. All parameters are
optional, if not supplied, the mentioned defaults will be used.
- Valid parameters and their syntax are:
-
-
CombineNonManifoldEdgesDistance=<value>
- If two non-manifold/sharp edges are in proximity with another edge within the
distance given for this argument, they will be merged together at the
mid-location.
-
CombineNonManifoldEdgesFactor=<value>
- Triggers the same option as CombineNonManifoldEdgesDistance,
but the distance is expressed as a factor of MinimumSize.
- A value of 1.0 means the CombineNonManifoldEdgesDistance is
same as MinimumSize. A value of 0.5 means the
CombineNonManifoldEdgesDistance is half of
MinimumSize.
- Default 0.5, range [0.0, 1.0].
-
DefeatureOpeningsFactor=<value>
- Triggers the same option as DefeatureOpeningsWidth, but the
distance is expressed as a factor of MinimumSize.
- A value of 1.0 means DefeatureOpeningsWidth is same as
MinimumSize. A value of 0.5 means the
DefeatureOpeningsWidth is half of
MinimumSize.
- Default 0.5, range [0.0, 1.0].
-
DefeatureOpeningsWidth=<value>
- If a hole/opening is of lesser width than the given value, it will be
closed.
-
DefeatureRibsWidth=<value>
- If a rib's width is lesser than the given value, it will be removed.
-
DefeatureRibsWidthFactor=<value>
- Triggers the same option as DefeatureRibsWidth, but the
distance is expressed as a factor of MinimumSize.
- A value of 1.0 means DefeatureRibsWidth is same as
MinimumSize. A value of 0.5 means the
DefeatureOpeningsWidth is half of
MinimumSize.
- Default 0.5, range [0.0, 1.0].
-
DestinationComponent=<value>
- Midmesh - All output mesh goes to Midmesh component or to the component whose
name is specified in the DestinationComponentName argument.
This is the default.
- Midmesh.# - For each input geometry, the generated midmeshes are organized into
a new Midmesh.# component. # denotes a unique incremental number.
- Original - For each input geometry, the generated midmesh is organized back into
the input components.
- Original.# - For each input geometry, the generated midmeshes are organized into
new Orignal.# components.
- Current - All generated midmeshes go to the current component.
-
DestinationComponentName=<name>
- The prefix to be used for the new shell element components created for the
output mesh. Default is Midmesh
-
ExtractionSize=<value>
- The size at which the midmesh is extracted. Default 2.0.
-
FlattenConnections=<value>
- 0 - The default Y shaped connections are retained (default)
- 1 - The output will be flattened at the connections. Y shaped connections are
flattened to T shape. Stepped geometry (One side continuous surface, and opposite
side steps) will be captured as continuous surface there by deviating from
middle.
-
IgnoreFlatEdges=<value>
- 0 - No specific treatment done to remove flat bottom edges
- 1 - Flat bottom edges are not retained in the output
- MidlineTrimFilletsFactor=<value>
- If a fillet edge is in proximity with another fillet edge within the threshold
distance calculated from this factor, a trim line is added in between these two
fillet edges. The threshold distance is calculated as
MinimumSize times
MidlineTrimFilletsFactor. The fillet edges then may undergo
suppression based on SuppressProximityFilletsFactor.
- A value of 1.0 means the distance threshold used for trimming a mid-line for
proximate fillet edges is same as the MinimumSize. A value of
0.5 means it is half of MinimumSize.
- Default 0.5, range [0.0, 1.0].
-
MinimumSize=<value>
- The value used for defeaturing the topology based on the factors
SupressProximityEdgesFactor, CombineNonManifoldEdgesFactor and
DefeatureOpeningsFactor. It is recommended to set this value the same as the
minimum allowable element length for your final target mesh. Default is
ExtractionSize.
-
StepOffsetMode=<value>
- This option allows finer control of how stepped geometry (one side continuous
surface, and opposite side steps) is captured. This option is valid only when
FlattenConnections=1. This option also deprecates
FlattenConnections=2. For the sake of backwards
compatibility, if FlattenConnections=2 is defined,
StepOffsetMode is ignored. Valid values are:
- Automatic - Steps of different thickness across a common base surface are
automatically offset to a uniform distance from the base surface
(default).
MidEverywhere - Each step will be placed in the
middle.
MidThinnest - All steps that share a common base are moved to the
middle of the thinnest step.
MidThickest - All steps that share a common
base are moved to the middle of the thickest step. This might place parts of
the midmesh outside the solid.
-
SuppressProximityEdgesDistance=<value>
- If a manifold edge is in proximity with another edge within the distance given
for this argument, it will be suppressed. Sharp edges are not considered for this
operation. If the edge is a fillet edge, and a different value is given for
SuppressProximityFilletFactor, that value will be given
priority.
-
SuppressProximityEdgesFactor=<value>
- Triggers the same option as SuppressProximityEdgesDistance,
but the distance is expressed as a factor of MinimumSize.
- A value of 1.0 means the SuppressProximityEdgesDistance is
same as MinimumSize. A value of 0.5 means the
SuppressProximityEdgesDistance is half of
MinimumSize.
- Default 0.5, range [0.0, 1.0].
- SuppressProximityFilletsFactor=<value>
- If a fillet edge is in proximity with another fillet/non-manifold/sharp edge
within the threshold distance calculated from this factor, it will be suppressed.
The threshold distance is calculated as MinimumSize times
SuppressProximityFilletsFactor.
- A value of 1.0 means the distance threshold used for suppressing proximate
fillet edges is same as MinimumSize. A value of 0.5 means it is
half of MinimumSize.
- Default 0.5, range [0.0, 1.0].
-
TargetElementSize=<value>
- This value is used for fine tuning certain internal computations to go well with
the expectations according to the final target element size. It affects the
suppression of flat edges, and edges in proximity. Default is
ExtractionSize.
-
number_of_strings
- Integer indicating the size (number of strings) in the string array created using
*createstringarray.
Examples
To extract the midmesh of all solids present in the model with element size as 2.0 with
SuppressProximityEdgesFactor and CombineNonManifoldEdgesFactor as 0.5:
*createmark solids 1 all
*createstringarray 3 {ElementSize: 2.0} {SuppressProximityEdgesFactor: 0.5} {CombineNonManifoldEdgesFactor: 0.5}
*midmesh_extract solids 1 1 3
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
2020.1 - Added new options DefeatureRibsWidth,
DefeatureRibsWidthFactor and StepOffsetMode.
Deprecated FlattenConnections=2.
2022.2 - Added new options MidlineTrimFilletsFactor
and SuppressProximityFilletsFactor.