Method TryIntersectWith
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
TryIntersectWith(GeoLine2, GeoLine2, out GeoPoint2)
Tries to calculate the intersection point between two line segments using default tolerance.
public static bool TryIntersectWith(GeoLine2 line1, GeoLine2 line2, out GeoPoint2 intersection)
Parameters
line1GeoLine2The first line segment.
line2GeoLine2The second line segment.
intersectionGeoPoint2The resulting intersection point if successful.
Returns
- bool
true if the line segments intersect; otherwise, false.
TryIntersectWith(GeoLine2, GeoLine2, out GeoPoint2, Tolerance)
Tries to calculate the intersection point between two line segments within tolerance.
public static bool TryIntersectWith(GeoLine2 line1, GeoLine2 line2, out GeoPoint2 intersection, Tolerance tolerance)
Parameters
line1GeoLine2The first line segment.
line2GeoLine2The second line segment.
intersectionGeoPoint2The resulting intersection point if successful.
toleranceToleranceThe tolerance.
Returns
- bool
true if the line segments intersect within tolerance; otherwise, false.
TryIntersectWith(GeoLine2, GeoLine2, LineExtension, out GeoPoint2)
Tries to calculate the intersection point between two line segments, reading either or both as the infinite line carrying it, using default tolerance.
public static bool TryIntersectWith(GeoLine2 line1, GeoLine2 line2, LineExtension extension, out GeoPoint2 intersection)
Parameters
line1GeoLine2The first line segment.
line2GeoLine2The second line segment.
extensionLineExtensionWhich of the two may be reached past its endpoints.
intersectionGeoPoint2The resulting intersection point if successful.
Returns
- bool
true if the lines meet within the reach allowed; otherwise, false.
TryIntersectWith(GeoLine2, GeoLine2, LineExtension, out GeoPoint2, Tolerance)
Tries to calculate the intersection point between two line segments, reading either or both as the infinite line carrying it, within tolerance.
public static bool TryIntersectWith(GeoLine2 line1, GeoLine2 line2, LineExtension extension, out GeoPoint2 intersection, Tolerance tolerance)
Parameters
line1GeoLine2The first line segment.
line2GeoLine2The second line segment.
extensionLineExtensionWhich of the two may be reached past its endpoints.
intersectionGeoPoint2The resulting intersection point if successful.
toleranceToleranceThe tolerance.
Returns
- bool
true if the lines meet within the reach allowed; otherwise, false.
Remarks
This is AutoCAD's IntersectWith with its Intersect option: Both
finds where two axes would cross however short they are drawn, First
where the first would reach the second if it were extended. Parallel lines are refused whatever the
extension, as they are without one: they either never meet or share a whole stretch, and neither is
a single point. The point returned lies on every segment that was not extended.
A segment that is not extended is reached up to the point tolerance past its ends, and the point is clamped onto it, so that splitting, trimming and extending find the crossing on both. This places points; it is not a test of contact. The segment ending at (10, 0) and the one leaving (10.00135, 0.00078) at 60 degrees meet here at (10, 0) at a tolerance of a thousandth, though they are 0.00156 apart and do not collide.
A segment no longer than the point tolerance has no direction to be reached along, and meets the other, with neither extended, only where it truly crosses it: at a thousandth, the one from (5, 0.0004) to (5, -0.0005) meets the segment from the origin to (10, 0) at (5, 0), and the one from (5, 0.0008) to (5, 0.0002) meets it nowhere.
A segment with a coordinate that is not a finite number meets nothing, and the answer is false: the segment from (NaN, 0) to (0, 100) and the one from the origin to (0, 100), which share an end, were given a point of NaN.
Exceptions
- ArgumentOutOfRangeException
Thrown when the extension is not a defined value.
TryIntersectWith(GeoCircle2, GeoLine2, out GeoPoint2[])
Tries to calculate the intersection points between a circle and a line segment using default tolerance.
public static bool TryIntersectWith(GeoCircle2 circle, GeoLine2 line, out GeoPoint2[] intersections)
Parameters
circleGeoCircle2lineGeoLine2intersectionsGeoPoint2[]
Returns
TryIntersectWith(GeoCircle2, GeoLine2, out GeoPoint2[], Tolerance)
Tries to calculate the intersection points between a circle and a line segment within tolerance.
public static bool TryIntersectWith(GeoCircle2 circle, GeoLine2 line, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
circleGeoCircle2lineGeoLine2intersectionsGeoPoint2[]toleranceTolerance
Returns
Remarks
A line passing outside the circle within the point tolerance of its rim touches it once, at the foot of the perpendicular from the centre. A line passing inside it crosses it twice, each crossing kept where it lies on the segment; two crossings no further apart than twice the point tolerance are one, at the foot. The segment 50 long from (0, 49.9995) along (1, 0.001), against the circle of radius 50 about the origin at a tolerance of 0.001, leaves the circle once, at (0.1791, 49.99968). A segment whose line runs inside the rim within the tolerance of it, but which crosses the rim nowhere along its length, touches it once where it comes within the tolerance: at the foot when the foot is on it. At a tolerance of 0.1 the segment from (-0.2, 49.97) to (0.2, 49.97) touches the circle of radius 50 at (0, 49.97).
Any other segment touches the circle exactly where it comes within the point tolerance of its rim, as the shortest line to the rim measures it, however far its line runs on before it would cross: once, at its point nearest the centre where it lies outside, else at its end nearer the rim. At a tolerance of 0.001, the segment from (0.05, 50.0005) to (10, 50.0005), whose line passes nearest the circle of radius 50 0.05 behind its start, touches it at its start, 0.000525 off; the one from (0, 49.95) to (2.225, 49.95) at its end, 0.00047 inside; and the one from (0.0009, 0.0019) to (1, 0.0019), whose line passes 0.0009 above the circle of radius 0.001 about the origin just behind its start, does not touch it, the start being 0.0011 off. A crossing up to the tolerance past an end, taken at that end, within twice the tolerance of the other crossing is the same touch, and counts once: the segment from (-1, 0) to (0.0004, 0) meets the circle of radius 0.0012 about the origin at (-0.0012, 0) only. A segment no longer than the tolerance is read as its start.
A segment or a circle with a coordinate that is not a finite number meets nothing, and the answer is false.
TryIntersectWith(GeoCircle2, GeoCircle2, out GeoPoint2[])
Tries to calculate the intersection points between two circles using default tolerance.
public static bool TryIntersectWith(GeoCircle2 c1, GeoCircle2 c2, out GeoPoint2[] intersections)
Parameters
c1GeoCircle2c2GeoCircle2intersectionsGeoPoint2[]
Returns
TryIntersectWith(GeoCircle2, GeoCircle2, out GeoPoint2[], Tolerance)
Tries to calculate the intersection points between two circles within tolerance.
public static bool TryIntersectWith(GeoCircle2 c1, GeoCircle2 c2, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
c1GeoCircle2c2GeoCircle2intersectionsGeoPoint2[]toleranceTolerance
Returns
Remarks
The crossings are worked out from the smaller circle, so they are the same two points whichever circle is asked first, and stay accurate when the other is huge. The circle of radius 2.5E8 that carries an edge 100 long of bulge 1E-7, from (0, 0) to (100, 0), meets the circle of radius 40 about (50, 30) at (23.54249, 0) and (76.45751, 0) either way round; worked from the larger circle, they came out 0.076 off.
Two circles that stay within the point tolerance of each other all the way round, their centres and their radii no more than the tolerance apart put together, are one circle and cross nowhere; so are two whose centres are closer than the tolerance where the rounding of the numbers leaves no line to cross on (see AboutOneCentre(double, double, double, double, Tolerance)). Otherwise the circles cross where they do, however close their centres: the circle of radius 1000 about the origin and the circle of radius 1000.0005 about (0.0006, 0) cross at (-833.33324, 552.77094) and (-833.33324, -552.77094).
TryIntersectWith(GeoPolyline2, GeoLine2, out GeoPoint2[])
Tries to calculate all intersection points between a polyline and a line segment using default tolerance.
public static bool TryIntersectWith(GeoPolyline2 polyline, GeoLine2 line, out GeoPoint2[] intersections)
Parameters
polylineGeoPolyline2lineGeoLine2intersectionsGeoPoint2[]
Returns
TryIntersectWith(GeoPolyline2, GeoLine2, out GeoPoint2[], Tolerance)
Tries to calculate all intersection points between a polyline and a line segment within tolerance.
public static bool TryIntersectWith(GeoPolyline2 polyline, GeoLine2 line, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline2lineGeoLine2intersectionsGeoPoint2[]toleranceTolerance
Returns
Remarks
A segment or a polyline with a coordinate that is not a finite number meets nothing, and the answer is false.
TryIntersectWith(GeoPolylineArc2, GeoLine2, out GeoPoint2[])
Tries to find where a chain that may curve meets a straight segment.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoLine2 line, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2lineGeoLine2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoLine2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets a straight segment, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoLine2 line, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2lineGeoLine2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Remarks
A segment or a chain with a coordinate or a bulge that is not a finite number meets nothing, and the answer is false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoArc2, out GeoPoint2[])
Tries to find where a chain that may curve meets an arc.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoArc2 arc, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2arcGeoArc2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoArc2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets an arc, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoArc2 arc, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2arcGeoArc2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoCircle2, out GeoPoint2[])
Tries to find where a chain that may curve meets a circle.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoCircle2 circle, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2circleGeoCircle2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoCircle2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets a circle, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoCircle2 circle, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2circleGeoCircle2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolyline2, out GeoPoint2[])
Tries to find where a chain that may curve meets a straight chain.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolyline2 polyline, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2polylineGeoPolyline2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolyline2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets a straight chain, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolyline2 polyline, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2polylineGeoPolyline2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolygon2, out GeoPoint2[])
Tries to find where a chain that may curve meets a straight loop.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolygon2 polygon, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2polygonGeoPolygon2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolygon2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets a straight loop, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolygon2 polygon, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2polygonGeoPolygon2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolylineArc2, out GeoPoint2[])
Tries to find where a chain that may curve meets a chain that may curve.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolylineArc2 other, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2otherGeoPolylineArc2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolylineArc2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets a chain that may curve, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolylineArc2 other, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2otherGeoPolylineArc2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolygonArc2, out GeoPoint2[])
Tries to find where a chain that may curve meets a loop that may curve.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolygonArc2 loop, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2loopGeoPolygonArc2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoPolygonArc2, out GeoPoint2[], Tolerance)
Tries to find where a chain that may curve meets a loop that may curve, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoPolygonArc2 loop, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2loopGeoPolygonArc2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolygonArc2, GeoLine2, out GeoPoint2[])
Tries to find where a loop that may curve meets a straight segment.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoLine2 line, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2lineGeoLine2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoLine2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets a straight segment, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoLine2 line, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2lineGeoLine2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Remarks
A segment or a loop with a coordinate or a bulge that is not a finite number meets nothing, and the answer is false: a loop with a vertex at (NaN, 0) threw "A radius has to be a number" from the arc beside it, and one with a bulge of NaN threw "A bulge must be a number".
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoArc2, out GeoPoint2[])
Tries to find where a loop that may curve meets an arc.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoArc2 arc, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2arcGeoArc2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoArc2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets an arc, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoArc2 arc, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2arcGeoArc2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoCircle2, out GeoPoint2[])
Tries to find where a loop that may curve meets a circle.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoCircle2 circle, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2circleGeoCircle2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoCircle2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets a circle, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoCircle2 circle, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2circleGeoCircle2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolyline2, out GeoPoint2[])
Tries to find where a loop that may curve meets a straight chain.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolyline2 polyline, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2polylineGeoPolyline2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolyline2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets a straight chain, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolyline2 polyline, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2polylineGeoPolyline2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolygon2, out GeoPoint2[])
Tries to find where a loop that may curve meets a straight loop.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolygon2 polygon, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2polygonGeoPolygon2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolygon2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets a straight loop, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolygon2 polygon, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2polygonGeoPolygon2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolylineArc2, out GeoPoint2[])
Tries to find where a loop that may curve meets a chain that may curve.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolylineArc2 chain, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2chainGeoPolylineArc2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolylineArc2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets a chain that may curve, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolylineArc2 chain, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2chainGeoPolylineArc2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolygonArc2, out GeoPoint2[])
Tries to find where a loop that may curve meets a loop that may curve.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolygonArc2 other, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2otherGeoPolygonArc2intersectionsGeoPoint2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoPolygonArc2, out GeoPoint2[], Tolerance)
Tries to find where a loop that may curve meets a loop that may curve, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoPolygonArc2 other, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2otherGeoPolygonArc2intersectionsGeoPoint2[]toleranceTolerance
Returns
- bool
true when they meet anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoRay2, GeoLine2, out GeoPoint2)
Tries to find where a ray crosses a line segment, using the default tolerance.
public static bool TryIntersectWith(GeoRay2 ray, GeoLine2 line, out GeoPoint2 intersection)
Parameters
rayGeoRay2The ray.
lineGeoLine2The line segment.
intersectionGeoPoint2The crossing point if successful.
Returns
- bool
true if the two cross; otherwise, false.
TryIntersectWith(GeoRay2, GeoLine2, out GeoPoint2, Tolerance)
Tries to find where a ray crosses a line segment, within a tolerance.
public static bool TryIntersectWith(GeoRay2 ray, GeoLine2 line, out GeoPoint2 intersection, Tolerance tolerance)
Parameters
rayGeoRay2The ray.
lineGeoLine2The line segment.
intersectionGeoPoint2The crossing point if successful, placed on the ray, never behind its origin.
toleranceToleranceThe tolerance.
Returns
- bool
true if the two cross; otherwise, false, as for a segment parallel to the ray.
TryIntersectWith(GeoLine2, GeoRay2, out GeoPoint2)
Tries to find where a line segment crosses a ray, using the default tolerance.
public static bool TryIntersectWith(GeoLine2 line, GeoRay2 ray, out GeoPoint2 intersection)
Parameters
lineGeoLine2The line segment.
rayGeoRay2The ray.
intersectionGeoPoint2The crossing point if successful.
Returns
- bool
true if the two cross; otherwise, false.
TryIntersectWith(GeoLine2, GeoRay2, out GeoPoint2, Tolerance)
Tries to find where a line segment crosses a ray, within a tolerance.
public static bool TryIntersectWith(GeoLine2 line, GeoRay2 ray, out GeoPoint2 intersection, Tolerance tolerance)
Parameters
lineGeoLine2The line segment.
rayGeoRay2The ray.
intersectionGeoPoint2The crossing point if successful, placed on the segment.
toleranceToleranceThe tolerance.
Returns
- bool
true if the two cross; otherwise, false, as for a segment parallel to the ray.
TryIntersectWith(GeoRay2, GeoRay2, out GeoPoint2)
Tries to find where two rays cross, using the default tolerance.
public static bool TryIntersectWith(GeoRay2 ray1, GeoRay2 ray2, out GeoPoint2 intersection)
Parameters
ray1GeoRay2The first ray.
ray2GeoRay2The second ray.
intersectionGeoPoint2The crossing point if successful.
Returns
- bool
true if the two cross; otherwise, false.
TryIntersectWith(GeoRay2, GeoRay2, out GeoPoint2, Tolerance)
Tries to find where two rays cross, within a tolerance.
public static bool TryIntersectWith(GeoRay2 ray1, GeoRay2 ray2, out GeoPoint2 intersection, Tolerance tolerance)
Parameters
ray1GeoRay2The first ray.
ray2GeoRay2The second ray.
intersectionGeoPoint2The crossing point if successful, placed on the first ray, never behind its origin.
toleranceToleranceThe tolerance.
Returns
- bool
true if the carrier lines cross at a point each ray reaches, within the point tolerance of its origin or ahead of it; false for two rays parallel by angle, which neither has a length to measure a drift over.
Remarks
The ray from the origin along X and the one from (50, -50) along Y cross at (50, 0); the one from (50, 50) along Y runs away from the first and does not. A crossing within the point tolerance behind an origin is given, brought onto the first ray: this places a point, and whether the two touch is read by their distance.
TryIntersectWith(GeoCircle2, GeoRay2, out GeoPoint2[])
Tries to find where a ray crosses a circle, using the default tolerance.
public static bool TryIntersectWith(GeoCircle2 circle, GeoRay2 ray, out GeoPoint2[] intersections)
Parameters
circleGeoCircle2The circle.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
Returns
TryIntersectWith(GeoCircle2, GeoRay2, out GeoPoint2[], Tolerance)
Tries to find where a ray crosses a circle, within a tolerance.
public static bool TryIntersectWith(GeoCircle2 circle, GeoRay2 ray, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
circleGeoCircle2The circle.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
TryIntersectWith(GeoPolygonArc2, GeoRay2, out GeoPoint2[])
Tries to find where a ray crosses a curved loop, using the default tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoRay2 ray, out GeoPoint2[] intersections)
Parameters
loopGeoPolygonArc2The curved loop.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolygonArc2, GeoRay2, out GeoPoint2[], Tolerance)
Tries to find where a ray crosses a curved loop, within a tolerance.
public static bool TryIntersectWith(GeoPolygonArc2 loop, GeoRay2 ray, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
loopGeoPolygonArc2The curved loop.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TryIntersectWith(GeoPolyline2, GeoRay2, out GeoPoint2[])
Tries to find where a ray crosses a polyline, using the default tolerance.
public static bool TryIntersectWith(GeoPolyline2 polyline, GeoRay2 ray, out GeoPoint2[] intersections)
Parameters
polylineGeoPolyline2The polyline.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
Returns
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
TryIntersectWith(GeoPolyline2, GeoRay2, out GeoPoint2[], Tolerance)
Tries to find where a ray crosses a polyline, within a tolerance.
public static bool TryIntersectWith(GeoPolyline2 polyline, GeoRay2 ray, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
polylineGeoPolyline2The polyline.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
TryIntersectWith(GeoPolylineArc2, GeoRay2, out GeoPoint2[])
Tries to find where a ray crosses a curved chain, using the default tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoRay2 ray, out GeoPoint2[] intersections)
Parameters
chainGeoPolylineArc2The curved chain.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryIntersectWith(GeoPolylineArc2, GeoRay2, out GeoPoint2[], Tolerance)
Tries to find where a ray crosses a curved chain, within a tolerance.
public static bool TryIntersectWith(GeoPolylineArc2 chain, GeoRay2 ray, out GeoPoint2[] intersections, Tolerance tolerance)
Parameters
chainGeoPolylineArc2The curved chain.
rayGeoRay2The ray.
intersectionsGeoPoint2[]The crossing points when the method returns true; empty otherwise.
toleranceToleranceThe tolerance.
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.