Login | Sign Up

AutoLISP Function Detail
Name: inters

(inters pt1 pt2 pt3 pt4 [flag])

Generates the intersection point between four sets of coordinates. The first line is represented by pt1 (start) and pt2 (end). The second line is represented by pt3 (start) and pt4 (end). The flag must be set to T if you are checking to see if the lines are currently intersecting, otherwise if the flag is set to nil the inters function will calculate the intersection of the two lines from one of the endpoints of the lines. If the points are represented as 3D (X Y Z) points then the return value is a 3D point, else the point is returned as 2D (X Y).

(inters '(0 0) '(5 5) '(2 5) '(3 4) T)

(inters '(0 0) '(5 5) '(2 5) '(3 4) nil)
(3.5 3.5)

(inters '(0 0) '(5 5) '(2 5) '(5 0) T)
(3.125 3.125)