Model.hm_getsurfacethicknessvaluesbyentity#

Model.hm_getsurfacethicknessvaluesbyentity(entity)#

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.

Parameters:

entity (Entity) – The object describing the entity to query. Valid entities are nodes, points, elements.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResultList - Result list object containing HmQueryResult objects with the following output data:

    • surface (Entity) - The associated surface - Entity Type: Surface

    • thickness (double) - Thickness of the surface at the node or point location (-1 if not defined)/Thickness at the element centroid if entity is of element type

    • offset (double) - Thickness offset. If entity is of element type then is the offset at element centroid

Examples#

Retrieve the list of surfaces, thicknesses, and offsets for node with ID 100 that is located on a shared edge between surfaces ID 10 and 11#
import hm
import hm.entities as ent

model = hm.Model()

_, node_thick = model.hm_getsurfacethicknessvaluesbyentity(entity=ent.Node(model, 100))

for result in node_thick:
    print("Node Thickness:", result.thickness)
    print("Surface:", result.surface.id)
    print("Thickness offset:", result.offset)
Get the surface, thickness, and offset at the centroid for element with ID 50#
import hm
import hm.entities as ent

model = hm.Model()

_, elem_thick = model.hm_getsurfacethicknessvaluesbyentity(entity=ent.Element(model, 50))

for result in elem_thick:
    print("Node Thickness:", result.thickness)
    print("Surface:", result.surface.id)
    print("Thickness offset:", result.offset)