Table of Contents

Method TryIntersectWith

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryIntersectWith(GeoArc2, GeoLine2, out GeoPoint2[])

Finds where an arc meets a segment, using the default tolerance.

public static bool TryIntersectWith(GeoArc2 arc, GeoLine2 line, out GeoPoint2[] intersections)

Parameters

arc GeoArc2
line GeoLine2
intersections GeoPoint2[]

Returns

bool

TryIntersectWith(GeoArc2, GeoLine2, out GeoPoint2[], Tolerance)

Finds where an arc meets a segment, within a tolerance.

public static bool TryIntersectWith(GeoArc2 arc, GeoLine2 line, out GeoPoint2[] intersections, Tolerance tolerance)

Parameters

arc GeoArc2

The arc.

line GeoLine2

The segment.

intersections GeoPoint2[]

The crossings, empty when there are none.

tolerance Tolerance

The tolerance.

Returns

bool

true if they meet at least once; otherwise, false.

Remarks

The circle carrying the arc may be met where the arc itself does not reach, and those crossings are left out. A segment that meets the arc nowhere so still touches it where it comes within the point tolerance of it, exactly where CollidesWith(GeoLine2, GeoArc2, Tolerance) says they collide: once, at the foot of the perpendicular from the centre when its line runs inside the rim within the tolerance of it, the foot is on the segment and the arc holds it, else at the point of the segment nearest the arc. At a tolerance of 0.001, a segment ending 0.0002 from the end of an arc, its line 0.0002 inside the rim, touches the arc at that end of the segment; and the arc of radius 50 about (0, 50.0002) starting 0.0045 radians past its bottom, at (0.2249992, 0.0007062), touches the segment along the x axis below that start, though its circle passes the segment where the arc does not reach.

A segment or an arc with a coordinate or an angle that is not a finite number meets nothing, and the answer is false: the arc from (200, 0) to (NaN, 0) threw "A radius has to be a number".

TryIntersectWith(GeoArc2, GeoCircle2, out GeoPoint2[])

Finds where an arc meets a circle, using the default tolerance.

public static bool TryIntersectWith(GeoArc2 arc, GeoCircle2 circle, out GeoPoint2[] intersections)

Parameters

arc GeoArc2
circle GeoCircle2
intersections GeoPoint2[]

Returns

bool

TryIntersectWith(GeoArc2, GeoCircle2, out GeoPoint2[], Tolerance)

Finds where an arc meets a circle, within a tolerance.

public static bool TryIntersectWith(GeoArc2 arc, GeoCircle2 circle, out GeoPoint2[] intersections, Tolerance tolerance)

Parameters

arc GeoArc2
circle GeoCircle2
intersections GeoPoint2[]
tolerance Tolerance

Returns

bool

TryIntersectWith(GeoArc2, GeoArc2, out GeoPoint2[])

Finds where two arcs meet, using the default tolerance.

public static bool TryIntersectWith(GeoArc2 first, GeoArc2 second, out GeoPoint2[] intersections)

Parameters

first GeoArc2
second GeoArc2
intersections GeoPoint2[]

Returns

bool

TryIntersectWith(GeoArc2, GeoArc2, out GeoPoint2[], Tolerance)

Finds where two arcs meet, within a tolerance.

public static bool TryIntersectWith(GeoArc2 first, GeoArc2 second, out GeoPoint2[] intersections, Tolerance tolerance)

Parameters

first GeoArc2

The first arc.

second GeoArc2

The second arc.

intersections GeoPoint2[]

The crossings, empty when there are none.

tolerance Tolerance

The tolerance.

Returns

bool

true if they meet at least once; otherwise, false.

Remarks

A crossing counts only where both arcs reach it, so two arcs of the same circle that do not overlap have none even though their circles are everywhere the same. The crossings do not depend on which arc is asked first, however flat one of them is: the edge 100 long of bulge 1E-7 from (0, 0) to (100, 0), an arc of radius 2.5E8, crosses the arc of radius 40 about (50, 30) from 3.4 radians sweeping 1.6 at (23.54249, 0) either way round.

TryIntersectWith(GeoArc2, GeoRay2, out GeoPoint2[])

Tries to find where an arc meets a ray, using the default tolerance.

public static bool TryIntersectWith(GeoArc2 arc, GeoRay2 ray, out GeoPoint2[] intersections)

Parameters

arc GeoArc2

The arc.

ray GeoRay2

The ray.

intersections GeoPoint2[]

The crossing points when the method returns true; empty otherwise.

Returns

bool

TryIntersectWith(GeoArc2, GeoRay2, out GeoPoint2[], Tolerance)

Tries to find where an arc meets a ray, within a tolerance.

public static bool TryIntersectWith(GeoArc2 arc, GeoRay2 ray, out GeoPoint2[] intersections, Tolerance tolerance)

Parameters

arc GeoArc2

The arc.

ray GeoRay2

The ray.

intersections GeoPoint2[]

The crossing points when the method returns true; empty otherwise.

tolerance Tolerance

The tolerance.

Returns

bool