Model.hm_getlinearclenpoint#
- Model.hm_getlinearclenpoint(line_entity, dist, x, y, z)#
Finds and returns the coordinates of the point of the line entity, whose arc-length distance from the point P with coordinates (
x,y,z) isdist.- Parameters:
line_entity (Entity) – The object describing the line entity whose arc-length distance from the point P is
dist.dist (double) – The arc-length distance from the point P.
x (double) – The x-coordinate of the point P.
y (double) – The y-coordinate of the point P.
z (double) – The z-coordinate of the point P.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:If point P is not on the line then an error is returned. Otherwise, the result contains:
pointCoordinates (numpy.ndarray)
locationFlag (int) - Possible flag values are 0, -1 and -2:
0 - The result point is found to be on the line
-1 - The result point happens to be off the line because the given
arc_distaceis too large and the result is off the start point of the line. Then the returned point is the start point of the line.-2 - The result point happens to be off the line because the given
arc_distaceis too large and the result is off the end point point of the line. Then the returned point is the end point of the line.
Example#
Get the coordinates of the point of line 2751 , that is at an arc - length distance of 8.5 from the point ( 10.2 , 32.5 , 2 ) that lies on the line#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getlinearclenpoint( line_entity=ent.Line(model, 2751), dist=8.5, x=10.2, y=32.5, z=2.0 ) print("pointCoordinates", result.pointCoordinates) print("locationFlag", result.locationFlag)