Model.hm_getlinetangentatcoordinate#
- Model.hm_getlinetangentatcoordinate(line, x, y, z)#
Returns the closest point, components of the tangent vector and the angle between the tangent vector and the z-axis at the point on the line closest to the input coordinates. The first 3 return values are the closest point coordinates, the next 3 are the tangent vector components, and the last return value is the angle.
- Parameters:
line (Entity) – The object describing the line entity closest to the input coordinates.
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
tangentVectorComponents (numpy.ndarray) - the tangent vector components
angle (double) - the angle between the tangent vector and the z-axis at the point on the line closest to the input coordinates
Example#
Get the components of the tangent vector and the angle between the tangent vector and the z - axis nearest the coordinates ( 100,50,25 ) for the line with ID 341#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getlinetangentatcoordinate( line=ent.Line(model, 341), x=100.0, y=50.0, z=25.0 ) print("closestPointCoordinates", result.closestPointCoordinates) print("tangentVectorComponents", result.tangentVectorComponents) print("angle", result.angle)