Model.hm_getnodegeometry#
- Model.hm_getnodegeometry(node_entity, geom_type='')#
Get the simplest geometry entity associated with the node.
Returns three types of geometry entities, initial, current or fegeometry.
If
geom_type="initial"means the geometry to which a node is associated during mesh generation, or the association was imposed using theModel.nodesassociatetogeometry()function.If
geom_type="current"means the geometry on which a node is currently placed.If
geom_type="fegeometry"means the FE geometry on which a node is currently placed.- Parameters:
node_entity (Entity) – The object describing the node entity.
geom_type (hwString) –
An option to return associated geometry type.
initial - Returns the associated initial geometry entity.
current - Returns the associated current geometry entity.
fegeometry - Returns the associated current FE geometry entity.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:entity (Entity) - Geometric entity associated with node. Valid entities can be points, lines or surfaces.
Note
If the node is associated with more than one geometric entity, only the simplest one is returned by this function. For example, using this function for a node located on the edge of a surface would return line, because the line is simpler (fewer dimensions) than the surface. Respectively a corner node would return a point because the corner is a vertex.
Example#
Get geometric entity associated with node with ID 1#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getnodegeometry( node_entity=ent.Node(model, 1), geom_type="current" ) print("Geometric entity type:", result.entity.fulltype) print("Geometric entity id:", result.entity.id)