Model.hm_getelementnormal#
- Model.hm_getelementnormal(element, queryType, queryIndex)#
Returns the normal vector of the specified element vertex/edge/face.
- Parameters:
element (Entity) – The object describing the 2D/3D element entity to query.
queryType (hwString) –
vertex -
query_indexis the index of a vertex (node) of a 2D/3D element.edge -
query_indexis the index of an edge of a 2D element.face -
query_indexis the index of a face of a 3D element.queryIndex (int) – The index of the vertex (node), edge or face. The index is 1-based and is ordered the same as the nodes/edges/faces defining the element.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:normalVectorComponents (numpy.ndarray)
Examples#
Get the normal of shell element with ID 100 edge index 1#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getelementnormal( element=ent.Element(model, 100), queryType="edge", queryIndex=1 ) print("Normal Vector Components:", result.normalVectorComponents)
Get the normal of solid element with ID 300 face index 2#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getelementnormal( element=ent.Element(model, 300), queryType="face", queryIndex=2 ) print("Normal Vector Components:", result.normalVectorComponents)