Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 908 Bytes

File metadata and controls

46 lines (37 loc) · 908 Bytes

PtPerpLine3D

Description

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

Parameters

Name Type Description
pt VECTOR
pt0 VECTOR
pt1 VECTOR

Examples

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))

Version

Availability: from Vectorworks 2014

Category