PolylineIntersector

public static class PolylineIntersector
Finds every intersection event between two polylines, treating both as open.

Fields

NoiseUlps

#
public const int NoiseUlps = 1024
The slack allowed for floating point noise, in units in the last place of the largest coordinate in a test.

Methods

ContinuesAcrossSeam

#
public static bool ContinuesAcrossSeam(PolylineIntersection first, PolylineIntersection last, Polyline a, Polyline b)
Decide whether the first and last overlap events are really one overlap continuing across the seam.
first (PolylineIntersection)The first event along the first polyline.
last (PolylineIntersection)The last event along the first polyline.
a (Polyline)First polyline.
b (Polyline)Second polyline.
True if the last event carries on into the first across the seam.

ContinuesAcrossSecondSeam

#
public static bool ContinuesAcrossSecondSeam(PolylineIntersection earlier, PolylineIntersection later, Polyline b)
Decide whether two consecutive overlap events along the first polyline are one overlap continuing across the seam of the second.
earlier (PolylineIntersection)The event ending at the seam of the second polyline.
later (PolylineIntersection)The event starting at that seam.
b (Polyline)Second polyline.
True if the earlier event carries on into the later one across the seam.

Intersect

#
public static PolylineIntersection[] Intersect(Polyline a, Polyline b, double tolerance)
Find all intersection events between two polylines.
a (Polyline)First polyline.
b (Polyline)Second polyline.
tolerance (double)Largest distance at which the polylines count as touching.
All events, sorted along the first polyline.

IsSeamDuplicate

#
public static bool IsSeamDuplicate(PolylineIntersection x, PolylineIntersection y, Polyline a, Polyline b)
Decide whether two point events are the same contact found twice on the seam of a closed polyline.
x (PolylineIntersection)One point event.
y (PolylineIntersection)Another point event.
a (Polyline)First polyline.
b (Polyline)Second polyline.
True if both events are the same contact on a seam.