Returns the midsurface thickness and offset values for nodes, points, or
elements.
Syntax
hm_getsurfacethicknessvalues
entity_type
entity_id
or
hm_getsurfacethicknessvalues
entity_type mark_id element_method ?ambiguous_values?
Type
HyperMesh Tcl Query Command
Description
This command returns the midsurface thickness and offset values for nodes, points, or
elements.
An error is returned if a non-topological point or node or an element not associated to any
surface, is given as input.
Inputs
- entity_type
- The type of entity to query. Valid values are nodes, points and elems.
- entity_id
- The ID of the entity to query.
- For nodes and points, the return result is a list with the number of list values equal
to the number of surfaces connected to the entity. Each value is a list itself with
three sub-values. The first value is the ID of associated surface, the second value is
the thickness of the surface at the node or point location (-1 if not defined), and the
third value is the thickness offset.
- For elements, only a single list value is returned, also with three sub-values
indicating the surface ID, the thickness at the element centroid, and the offset at the
element centroid.
- mark_id
- The ID of the mark containing the entities to query. Valid values are 1 and 2.
- For nodes and points, the return result is a list with the number of list values equal
to the total number of surfaces connected to each entity. Each value is a list itself
with four sub-values. The first value is the ID of the or node, the second value is the
ID of the associated surface, the third value is the thickness of the surface at the
node or point location (-1 if not defined), and the fourth value is the thickness
offset.
- For elements, the return result is a list with the number of list values equal to the
total number of elements. For element_method 0-3, four sub-values
indicating the element ID, the surface ID, the thickness of the element (-1 if not
defined), and the offset of the element are returned. For
element_method 4, the element ID is returned as the first
sub-value. For each node of the element, a sub-list is returned containing the node ID,
the thickness at the node and the offset at the node for the element. For example:
{elem_id1 {node_id1 thickness_1 offset_1} {node_id2 thickness_2 offset_2} … {node_n thickness_n offset_n}} {elem_id2 {node_id1 thickness_1 offset_1} {node_id2 thickness_2 offset_2} … {node_n thickness_n offset_n}} … {elem_idn {node_id1 thickness_1 offset_1} {node_id2 thickness_2 offset_2} … {node_n thickness_n offset_n}}.
- element_method
- Only allowed for element mark_id based usage. This determines how
the thickness and offset values are measured for elements (ignored when the mark only
contains nodes or points). Valid values are:
- 0 - Thickness and offset are measured at the element centroid.
- 1 - Thickness and offset are measured as a weighted average of the element’s nodes. If
an element spans multiple surfaces, -1 is returned for the surface ID, thickness and
offset.
- 2 - Thickness is measured at the element's nodes and the minimum value is used. The
offset value from this node is also reported. If an element spans multiple surfaces, -1
is returned for the surface ID, thickness and offset.
- 3 - Thickness is measured at the element's nodes and the maximum value is used. The
offset value from this node is also reported. If an element spans multiple surfaces, -1
is returned for the surface ID, thickness and offset.
- 4 - The thickness of each element node is returned. For elements that don't span
surfaces but have nodes on shared/non-manifold edges or shared vertices, the reported
values should all come from the same "common surface" of the element. For elements that
do span surfaces, values for nodes on an edge/vertex between the shared surfaces, the
ambiguous_values argument is used. For surfaces that don't have
thickness, -1 is returned for the thickness and offset of any nodes associated with that
surface.
- ambiguous_values
- Defines what to do when an element that spans multiple surfaces and a node of that
element is on an edge/vertex between the shared surfaces. This option is only used for
element_method=4 when a "common surface" or a "most common surface"
cannot be determined. Surfaces that don't have a thickness are ignored and not
considered in the calculations. If all surfaces have no thickness, -1 is returned for
all nodes.
- 1 - Report the average value at nodes from spanned surfaces.
- 2 - Report the minimum value at nodes from spanned surfaces.
- 3 - Report the maximum of value at nodes from spanned surfaces.
Examples
Suppose that the node with ID 100 is located on a shared edge between surfaces having IDs
10 and 11. To retrieve the list of surfaces, thicknesses and
offsets:
set node_thick [ hm_getsurfacethicknessvalues nodes 100 ]
To get the surface, thickness and offset at the centroid for element
50:
set elem_thick [ hm_getsurfacethicknessvalues elems 50 ]
To get the surface, thickness and offset as the weighted node average for element
50:
*createmark elems 1 50
set elem_thick [ hm_getsurfacethicknessvalues elems 1 1 ]
To get the surface, thickness and offset for all displayed
nodes:
*createmark nodes 1 displayed
set node_thick [ hm_getsurfacethicknessvalues nodes 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
}