Returns a 3D point on the input 3D vector that goes through pt0 and pt1 which is closest to the input point. Doesn't check to see that the point is ON the line.
FUNCTION PtPerpLine3D(
pt : VECTOR;
pt0 : VECTOR;
pt1 : VECTOR) : VECTOR;def vs.PtPerpLine3D(pt, pt0, pt1):
return VECTOR| Name | Type | Description |
|---|---|---|
| pt | VECTOR | |
| pt0 | VECTOR | |
| pt1 | VECTOR |
result := PtPerpLine3D(pt, pt0, pt1);import vs
# Returns a 3D point on the input 3D vector that goes through pt0 and pt1
# which is closest to the input point.
pt = (0, 0)
pt0 = (1, 1)
pt1 = (2, 2)
vec = vs.PtPerpLine3D(pt, pt0, pt1)
vs.Message('PtPerpLine3D returned: ' + str(vec))Availability: from Vectorworks 2014