Finds the intersection of two lines
(inters pt1 pt2 pt3 pt4 [onseg])
inters checks for 3D intersection. If any of the points are 2D, inters projects the lines onto the current construction plane and checks only for 2D intersection.
All points are expressed in terms of the current UCS. If all four point arguments are 3D,Arguments
One endpoint of the first line.
The other endpoint of the first line.
One endpoint of the second line.
The other endpoint of the second line.
nil, the lines defined by the four pt arguments are considered infinite in length. If the onseg argument is omitted or is not nil, the intersection point must lie on both lines or inters returns nil.
If specified asReturn Values
nil, inters returns the point where the lines intersect, even if that point is off the end of one or both of the lines. If the onseg argument is omitted or is not nil, the intersection point must lie on both lines or inters returns nil. The inters function returns nil if the two lines do not intersect.
If the onseg argument is present and isExamples
(setq a '(1.0 1.0) b '(9.0 9.0))
(setq c '(4.0 1.0) d '(4.0 2.0))
Command: (inters a b c d)
nil
Command: (inters a b c d T)
nil
Command: (inters a b c d nil)
(4.0 4.0)