Model.hm_getsurfacenormalatcoordinate#
- Model.hm_getsurfacenormalatcoordinate(surface, x, y, z)#
Returns the closest point and the components of the normal vector at the point on the line closest to the input coordinates.
- Parameters:
surface (Entity) – The object describing the surface entity.
x (double) – The x-coordinate of the point
y (double) – The y-coordinate of the point
z (double) – The z-coordinate of the point
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:closestPointCoordinates (numpy.ndarray) - The closest point coordinates
normalVectorComponents (numpy.ndarray) - The normal vector components
Example#
Get the components of the normal vector nearest the coordinates ( 100,50,25 ) for the surface with ID 341#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getsurfacenormalatcoordinate( surface=ent.Surface(model, 341), x=100.0, y=50.0, z=25.0 ) print("Closest Point Coordinates:", result.closestPointCoordinates) print("Normal Vector Components:", result.normalVectorComponents)