Intersections

bool_point intersection_point(const Point& p0, const Point& p1)

const function

bool_point intersection_point(const Path& p)

const function

These functions find the intersection point of the Plane and a
line. In the first version, the
line is defined by the two Point arguments. In the second
version, the Pathp must be linear, i.e.,
p.is_linear() must be true.

Both versions of intersection_point() return a bool_pointbp, where bp.pt is the intersection point, or
INVALID_POINT, if there is none. If an intersection point is
found, bp.b will be true, otherwise false.
Returning a bool_point makes it possible to test for success
without comparing the Point returned against INVALID_POINT.

Returns a Linel. representing the line of intersection of two
Planes. See Line Reference.

In [next figure]
, intersection_line() is used to find the line of
intersection of the Planes derived from the Rectangles
r_0 and r_1 using get_plane()
(see Paths Reference; Querying).
Please note that there is no guarantee that l.position will
be in a convenient place for your drawing. A bit of fiddling was
needed to find the Points P_2 and P_3.
I plan to add functions for finding the intersection lines of plane
figures, but haven't done so yet.