Method TrySplitBy
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
TrySplitBy(GeoPolylineArc2, GeoPoint2, out GeoPolylineArc2, out GeoPolylineArc2)
Cuts a chain that may curve in two at a point on it.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPoint2 point, out GeoPolylineArc2 first, out GeoPolylineArc2 second)
Parameters
chainGeoPolylineArc2pointGeoPoint2firstGeoPolylineArc2secondGeoPolylineArc2
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TrySplitBy(GeoPolylineArc2, GeoPoint2, out GeoPolylineArc2, out GeoPolylineArc2, Tolerance)
Cuts a chain that may curve in two at a point on it, within a tolerance.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPoint2 point, out GeoPolylineArc2 first, out GeoPolylineArc2 second, Tolerance tolerance)
Parameters
chainGeoPolylineArc2pointGeoPoint2firstGeoPolylineArc2secondGeoPolylineArc2toleranceTolerance
Returns
- bool
true when the chain was cut; false when the point is not on it, or is one of its ends.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TrySplitBy(GeoPolylineArc2, GeoLine2, out GeoPolylineArc2[])
Cuts a chain that may curve wherever it meets a straight segment.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoLine2 cutter, out GeoPolylineArc2[] pieces)
Parameters
chainGeoPolylineArc2cutterGeoLine2piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TrySplitBy(GeoPolylineArc2, GeoLine2, out GeoPolylineArc2[], Tolerance)
Cuts a chain that may curve wherever it meets a straight segment, within a tolerance.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoLine2 cutter, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
chainGeoPolylineArc2cutterGeoLine2piecesGeoPolylineArc2[]toleranceTolerance
Returns
- bool
true when the chain was cut anywhere; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TrySplitBy(GeoPolylineArc2, GeoArc2, out GeoPolylineArc2[])
Cuts a chain that may curve wherever it meets an arc.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoArc2 cutter, out GeoPolylineArc2[] pieces)
Parameters
chainGeoPolylineArc2cutterGeoArc2piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TrySplitBy(GeoPolylineArc2, GeoArc2, out GeoPolylineArc2[], Tolerance)
Cuts a chain that may curve wherever it meets an arc, within a tolerance.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoArc2 cutter, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
chainGeoPolylineArc2cutterGeoArc2piecesGeoPolylineArc2[]toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TrySplitBy(GeoPolylineArc2, GeoPolygon2, out GeoPolylineArc2[])
Cuts a chain that may curve wherever it meets a straight loop.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPolygon2 cutter, out GeoPolylineArc2[] pieces)
Parameters
chainGeoPolylineArc2cutterGeoPolygon2piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain or the cutter is null.
TrySplitBy(GeoPolylineArc2, GeoPolygon2, out GeoPolylineArc2[], Tolerance)
Cuts a chain that may curve wherever it meets a straight loop, within a tolerance.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPolygon2 cutter, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
chainGeoPolylineArc2cutterGeoPolygon2piecesGeoPolylineArc2[]toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the chain or the cutter is null.
TrySplitBy(GeoPolylineArc2, GeoPolygonArc2, out GeoPolylineArc2[])
Cuts a chain that may curve wherever it meets a loop that may curve.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPolygonArc2 cutter, out GeoPolylineArc2[] pieces)
Parameters
chainGeoPolylineArc2cutterGeoPolygonArc2piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain or the cutter is null.
TrySplitBy(GeoPolylineArc2, GeoPolygonArc2, out GeoPolylineArc2[], Tolerance)
Cuts a chain that may curve wherever it meets a loop that may curve, within a tolerance.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPolygonArc2 cutter, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
chainGeoPolylineArc2cutterGeoPolygonArc2piecesGeoPolylineArc2[]toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the chain or the cutter is null.
TrySplitBy(GeoPolygonArc2, GeoLine2, out GeoPolylineArc2[])
Cuts a loop that may curve wherever it meets a straight segment.
public static bool TrySplitBy(GeoPolygonArc2 loop, GeoLine2 cutter, out GeoPolylineArc2[] pieces)
Parameters
loopGeoPolygonArc2cutterGeoLine2piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TrySplitBy(GeoPolygonArc2, GeoLine2, out GeoPolylineArc2[], Tolerance)
Cuts a loop that may curve wherever it meets a straight segment, within a tolerance.
public static bool TrySplitBy(GeoPolygonArc2 loop, GeoLine2 cutter, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
loopGeoPolygonArc2cutterGeoLine2piecesGeoPolylineArc2[]toleranceTolerance
Returns
- bool
true when the loop was cut into two or more chains; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TrySplitBy(GeoPolygonArc2, GeoPolygon2, out GeoPolylineArc2[])
Cuts a loop that may curve wherever it meets a straight loop.
public static bool TrySplitBy(GeoPolygonArc2 loop, GeoPolygon2 cutter, out GeoPolylineArc2[] pieces)
Parameters
loopGeoPolygonArc2cutterGeoPolygon2piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the loop or the cutter is null.
TrySplitBy(GeoPolygonArc2, GeoPolygon2, out GeoPolylineArc2[], Tolerance)
Cuts a loop that may curve wherever it meets a straight loop, within a tolerance.
public static bool TrySplitBy(GeoPolygonArc2 loop, GeoPolygon2 cutter, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
loopGeoPolygonArc2cutterGeoPolygon2piecesGeoPolylineArc2[]toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the loop or the cutter is null.
TrySplitBy(GeoPolylineArc2, GeoPoint2[], out GeoPolylineArc2[])
Cuts a chain that may curve at points on it.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPoint2[] points, out GeoPolylineArc2[] pieces)
Parameters
chainGeoPolylineArc2pointsGeoPoint2[]piecesGeoPolylineArc2[]
Returns
Exceptions
- ArgumentNullException
Thrown when the chain or the points are null.
TrySplitBy(GeoPolylineArc2, GeoPoint2[], out GeoPolylineArc2[], Tolerance)
Cuts a chain that may curve at points on it, within a tolerance.
public static bool TrySplitBy(GeoPolylineArc2 chain, GeoPoint2[] points, out GeoPolylineArc2[] pieces, Tolerance tolerance)
Parameters
chainGeoPolylineArc2pointsGeoPoint2[]piecesGeoPolylineArc2[]toleranceTolerance
Returns
Remarks
A point that is not on the chain is ignored rather than moved onto it.
Exceptions
- ArgumentNullException
Thrown when the chain or the points are null.
TrySplitBy(GeoPolygon2, GeoLine2, out GeoPolygon2[], out GeoPolygon2[])
Cuts a loop by the straight line through a segment.
public static bool TrySplitBy(GeoPolygon2 polygon, GeoLine2 cutter, out GeoPolygon2[] left, out GeoPolygon2[] right)
Parameters
polygonGeoPolygon2cutterGeoLine2leftGeoPolygon2[]rightGeoPolygon2[]
Returns
TrySplitBy(GeoPolygon2, GeoLine2, out GeoPolygon2[], out GeoPolygon2[], Tolerance)
Cuts a loop by the straight line through a segment, within a tolerance.
public static bool TrySplitBy(GeoPolygon2 polygon, GeoLine2 cutter, out GeoPolygon2[] left, out GeoPolygon2[] right, Tolerance tolerance)
Parameters
polygonGeoPolygon2The loop to cut.
cutterGeoLine2A segment, read as the whole straight line through it; its length is ignored.
leftGeoPolygon2[]The pieces on the left of the cutter's direction of travel.
rightGeoPolygon2[]The pieces on its right.
toleranceToleranceThe tolerance.
Returns
- bool
true when the line divided the loop, leaving something on both sides; otherwise, false, and the loop comes back whole on the side it lies on.
Remarks
Left and right are read from the cutter's own direction, so reversing the cutter swaps the two answers and nothing else. A concave loop can give several pieces to a side, which is why each side is an array.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
TrySplitBy(GeoFace2, GeoLine2, out GeoFace2[], out GeoFace2[])
Cuts a face by the straight line through a segment.
public static bool TrySplitBy(GeoFace2 face, GeoLine2 cutter, out GeoFace2[] left, out GeoFace2[] right)
Parameters
Returns
TrySplitBy(GeoFace2, GeoLine2, out GeoFace2[], out GeoFace2[], Tolerance)
Cuts a face by the straight line through a segment, within a tolerance.
public static bool TrySplitBy(GeoFace2 face, GeoLine2 cutter, out GeoFace2[] left, out GeoFace2[] right, Tolerance tolerance)
Parameters
faceGeoFace2The face to cut, holes and all.
cutterGeoLine2A segment, read as the whole straight line through it; its length is ignored.
leftGeoFace2[]The pieces on the left of the cutter's direction of travel.
rightGeoFace2[]The pieces on its right.
toleranceToleranceThe tolerance.
Returns
- bool
true when the line divided the face, leaving something on both sides; otherwise, false, and the face comes back whole on the side it lies on.
Remarks
A hole the line misses stays a hole in whichever piece keeps it; a hole the line crosses opens into the outline of both pieces, which is why a face can come back with fewer holes than it went in with.
Exceptions
- ArgumentNullException
Thrown when the face is null.
TrySplitBy(GeoPolygon2, GeoPolyline2, out GeoPolygon2[])
Cuts a loop in two along a chain drawn across it.
public static bool TrySplitBy(GeoPolygon2 subject, GeoPolyline2 cutLine, out GeoPolygon2[] pieces)
Parameters
subjectGeoPolygon2cutLineGeoPolyline2piecesGeoPolygon2[]
Returns
TrySplitBy(GeoPolygon2, GeoPolyline2, out GeoPolygon2[], Tolerance)
Cuts a loop in two along a chain drawn across it, within a tolerance.
public static bool TrySplitBy(GeoPolygon2 subject, GeoPolyline2 cutLine, out GeoPolygon2[] pieces, Tolerance tolerance)
Parameters
subjectGeoPolygon2The loop to cut.
cutLineGeoPolyline2The chain to cut along. Both of its ends have to sit on the loop's boundary and everything between them has to stay inside, or nothing is cut.
piecesGeoPolygon2[]The two pieces, or the loop alone.
toleranceToleranceThe tolerance.
Returns
- bool
true when the chain divided the loop in two; otherwise, false.
Remarks
This is the bounded cutter: the chain gives the exact line of the cut, so a piece keeps the chain's own vertices rather than a straight line between its ends. A chain that leaves the loop and comes back would divide it into more than two, so it is refused rather than answered in part.
Exceptions
- ArgumentNullException
Thrown when the loop or the chain is null.
TrySplitBy(GeoLine2, GeoPoint2, out GeoLine2, out GeoLine2)
Splits a line segment at a point lying on it, using the default tolerance.
public static bool TrySplitBy(GeoLine2 line, GeoPoint2 point, out GeoLine2 first, out GeoLine2 second)
Parameters
lineGeoLine2The line segment to split.
pointGeoPoint2The point to split at, which must lie on the segment.
firstGeoLine2The piece holding the start point of the segment.
secondGeoLine2The piece holding the end point of the segment.
Returns
- bool
true if the segment was split; otherwise, false.
TrySplitBy(GeoLine2, GeoPoint2, out GeoLine2, out GeoLine2, Tolerance)
Splits a line segment at a point lying on it, within tolerance.
public static bool TrySplitBy(GeoLine2 line, GeoPoint2 point, out GeoLine2 first, out GeoLine2 second, Tolerance tolerance)
Parameters
lineGeoLine2The line segment to split.
pointGeoPoint2The point to split at, which must lie on the segment.
firstGeoLine2The piece holding the start point of the segment.
secondGeoLine2The piece holding the end point of the segment.
toleranceToleranceThe tolerance.
Returns
- bool
true if the segment was split; false if the point is off the segment, or sits on one of its endpoints, where there is nothing to cut.
TrySplitBy(GeoPolyline2, GeoPoint2, out GeoPolyline2, out GeoPolyline2)
Splits a polyline at a point lying on it, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 polyline, GeoPoint2 point, out GeoPolyline2 first, out GeoPolyline2 second)
Parameters
polylineGeoPolyline2The polyline to split.
pointGeoPoint2The point to split at, which must lie on the polyline.
firstGeoPolyline2The piece holding the start point of the polyline.
secondGeoPolyline2The piece holding the end point of the polyline.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPoint2, out GeoPolyline2, out GeoPolyline2, Tolerance)
Splits a polyline at a point lying on it, within tolerance.
public static bool TrySplitBy(GeoPolyline2 polyline, GeoPoint2 point, out GeoPolyline2 first, out GeoPolyline2 second, Tolerance tolerance)
Parameters
polylineGeoPolyline2The polyline to split.
pointGeoPoint2The point to split at, which must lie on the polyline.
firstGeoPolyline2The piece holding the start point of the polyline.
secondGeoPolyline2The piece holding the end point of the polyline.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polyline was split; false if the point is off the polyline, or sits on one of its endpoints, where there is nothing to cut.
TrySplitBy(GeoLine2, GeoLine2, out GeoLine2, out GeoLine2)
Splits a line segment where a cutting line segment crosses it, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoLine2 cutter, out GeoLine2 first, out GeoLine2 second)
Parameters
subjectGeoLine2The line segment to split.
cutterGeoLine2The cutting line segment.
firstGeoLine2The piece holding the start point of the subject.
secondGeoLine2The piece holding the end point of the subject.
Returns
- bool
true if the subject was split; otherwise, false.
TrySplitBy(GeoLine2, GeoLine2, out GeoLine2, out GeoLine2, Tolerance)
Splits a line segment where a cutting line segment crosses it, within tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoLine2 cutter, out GeoLine2 first, out GeoLine2 second, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to split.
cutterGeoLine2The cutting line segment.
firstGeoLine2The piece holding the start point of the subject.
secondGeoLine2The piece holding the end point of the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the subject was split; false if the two segments miss each other, meet only at an endpoint of the subject, or are parallel — including the collinear overlap case, where there is no single position to cut at.
TrySplitBy(GeoLine2, GeoLine2[], out GeoLine2[])
Splits a line segment everywhere a list of cutting line segments crosses it, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoLine2[] cutters, out GeoLine2[] pieces)
Parameters
subjectGeoLine2The line segment to split.
cuttersGeoLine2[]The cutting line segments.
piecesGeoLine2[]The resulting pieces in order along the subject.
Returns
- bool
true if the subject was split by at least one cutter; otherwise, false.
TrySplitBy(GeoLine2, GeoLine2[], out GeoLine2[], Tolerance)
Splits a line segment everywhere a list of cutting line segments crosses it, within tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoLine2[] cutters, out GeoLine2[] pieces, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to split.
cuttersGeoLine2[]The cutting line segments.
piecesGeoLine2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the subject was split by at least one cutter; otherwise, false.
TrySplitBy(GeoLine2, GeoPolyline2, out GeoLine2[])
Splits a line segment everywhere a cutting polyline crosses it, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolyline2 cutter, out GeoLine2[] pieces)
Parameters
subjectGeoLine2The line segment to split.
cutterGeoPolyline2The cutting polyline.
piecesGeoLine2[]The resulting pieces in order along the subject.
Returns
- bool
true if the subject was split by the polyline; otherwise, false.
TrySplitBy(GeoLine2, GeoPolyline2, out GeoLine2[], Tolerance)
Splits a line segment everywhere a cutting polyline crosses it, within tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolyline2 cutter, out GeoLine2[] pieces, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to split.
cutterGeoPolyline2The cutting polyline.
piecesGeoLine2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the subject was split by the polyline; otherwise, false.
TrySplitBy(GeoLine2, GeoPoint2[], out GeoLine2[])
Splits a line segment everywhere a list of points lies on it, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPoint2[] points, out GeoLine2[] pieces)
Parameters
subjectGeoLine2The line segment to split.
pointsGeoPoint2[]The points to split at.
piecesGeoLine2[]The resulting pieces in order along the subject.
Returns
- bool
true if the subject was split; otherwise, false.
TrySplitBy(GeoLine2, GeoPoint2[], out GeoLine2[], Tolerance)
Splits a line segment everywhere a list of points lies on it, within tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPoint2[] points, out GeoLine2[] pieces, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to split.
pointsGeoPoint2[]The points to split at.
piecesGeoLine2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the subject was split; otherwise, false.
TrySplitBy(GeoLine2, GeoPolygon2[], out GeoLine2[], out GeoLine2[])
Splits a line segment everywhere a list of polygon boundaries crosses it, separating the parts that fall inside the polygons from those that fall outside, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolygon2[] cutters, out GeoLine2[] inside, out GeoLine2[] outside)
Parameters
subjectGeoLine2cuttersGeoPolygon2[]insideGeoLine2[]outsideGeoLine2[]
Returns
TrySplitBy(GeoLine2, GeoPolygon2[], out GeoLine2[], out GeoLine2[], Tolerance)
Splits a line segment everywhere a list of polygon boundaries crosses it, separating the parts that fall inside the polygons from those that fall outside, using a specified tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolygon2[] cutters, out GeoLine2[] inside, out GeoLine2[] outside, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to be split.
cuttersGeoPolygon2[]The array of polygons that cross the line segment.
insideGeoLine2[]The portions of the line segment that fall inside the polygons.
outsideGeoLine2[]The portions of the line segment that fall outside the polygons.
toleranceToleranceThe tolerance value to use for calculations.
Returns
- bool
True if the line segment is successfully split; otherwise, false.
TrySplitBy(GeoLine2, GeoPolyline2[], out GeoLine2[])
Splits a line segment everywhere a list of polylines crosses it, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolyline2[] cutters, out GeoLine2[] pieces)
Parameters
subjectGeoLine2The line segment to split.
cuttersGeoPolyline2[]The cutting polylines.
piecesGeoLine2[]The resulting pieces in order along the subject.
Returns
- bool
true if at least one polyline crosses the subject; otherwise, false.
TrySplitBy(GeoLine2, GeoPolyline2[], out GeoLine2[], Tolerance)
Splits a line segment everywhere a list of polylines crosses it, within tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolyline2[] cutters, out GeoLine2[] pieces, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to split.
cuttersGeoPolyline2[]The cutting polylines.
piecesGeoLine2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if at least one polyline crosses the subject; otherwise, false.
TrySplitBy(GeoPolyline2, GeoLine2, out GeoPolyline2[])
Splits a polyline everywhere a cutting line segment crosses it, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoLine2 cutter, out GeoPolyline2[] pieces)
Parameters
subjectGeoPolyline2The polyline to split.
cutterGeoLine2The cutting line segment.
piecesGeoPolyline2[]The pieces in order along the subject if split succeeds.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoLine2, out GeoPolyline2[], Tolerance)
Splits a polyline everywhere a cutting line segment crosses it, within tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoLine2 cutter, out GeoPolyline2[] pieces, Tolerance tolerance)
Parameters
subjectGeoPolyline2The polyline to split.
cutterGeoLine2The cutting line segment.
piecesGeoPolyline2[]The pieces in order along the subject if split succeeds.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPoint2[], out GeoPolyline2[])
Splits a polyline everywhere a list of points lies on it, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPoint2[] points, out GeoPolyline2[] pieces)
Parameters
subjectGeoPolyline2The polyline to split.
pointsGeoPoint2[]The points to split at.
piecesGeoPolyline2[]The resulting pieces in order along the subject.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPoint2[], out GeoPolyline2[], Tolerance)
Splits a polyline everywhere a list of points lies on it, within tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPoint2[] points, out GeoPolyline2[] pieces, Tolerance tolerance)
Parameters
subjectGeoPolyline2The polyline to split.
pointsGeoPoint2[]The points to split at.
piecesGeoPolyline2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoLine2[], out GeoPolyline2[])
Splits a polyline everywhere a list of cutting line segments crosses it, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoLine2[] cutters, out GeoPolyline2[] pieces)
Parameters
subjectGeoPolyline2The polyline to split.
cuttersGeoLine2[]The cutting line segments.
piecesGeoPolyline2[]The resulting pieces in order along the subject.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoLine2[], out GeoPolyline2[], Tolerance)
Splits a polyline everywhere a list of cutting line segments crosses it, within tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoLine2[] cutters, out GeoPolyline2[] pieces, Tolerance tolerance)
Parameters
subjectGeoPolyline2The polyline to split.
cuttersGeoLine2[]The cutting line segments.
piecesGeoPolyline2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPolyline2[], out GeoPolyline2[])
Splits a polyline everywhere a list of cutting polylines crosses it, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPolyline2[] cutters, out GeoPolyline2[] pieces)
Parameters
subjectGeoPolyline2The polyline to split.
cuttersGeoPolyline2[]The cutting polylines.
piecesGeoPolyline2[]The resulting pieces in order along the subject.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPolyline2[], out GeoPolyline2[], Tolerance)
Splits a polyline everywhere a list of cutting polylines crosses it, within tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPolyline2[] cutters, out GeoPolyline2[] pieces, Tolerance tolerance)
Parameters
subjectGeoPolyline2The polyline to split.
cuttersGeoPolyline2[]The cutting polylines.
piecesGeoPolyline2[]The resulting pieces in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polyline was split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPolygon2[], out GeoPolyline2[], out GeoPolyline2[])
Splits a polyline everywhere a list of polygon boundaries crosses it, separating the parts that fall inside the polygons from those that fall outside, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPolygon2[] cutters, out GeoPolyline2[] inside, out GeoPolyline2[] outside)
Parameters
subjectGeoPolyline2The polyline to be split.
cuttersGeoPolygon2[]The array of polygons that cross the polyline.
insideGeoPolyline2[]The portions of the polyline that fall inside the polygons.
outsideGeoPolyline2[]The portions of the polyline that fall outside the polygons.
Returns
- bool
True if the polyline is successfully split; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPolygon2[], out GeoPolyline2[], out GeoPolyline2[], Tolerance)
Splits a polyline everywhere a list of polygon boundaries crosses it, separating the parts that fall inside the polygons from those that fall outside, using a specified tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPolygon2[] cutters, out GeoPolyline2[] inside, out GeoPolyline2[] outside, Tolerance tolerance)
Parameters
subjectGeoPolyline2The polyline to be split.
cuttersGeoPolygon2[]The array of polygons that cross the polyline.
insideGeoPolyline2[]The portions of the polyline that fall inside the polygons.
outsideGeoPolyline2[]The portions of the polyline that fall outside the polygons.
toleranceToleranceThe tolerance value to use for calculations.
Returns
- bool
True if the polyline is successfully split; otherwise, false.
TrySplitBy(GeoLine2, GeoPolygon2, out GeoLine2[], out GeoLine2[])
Splits a line segment where a polygon boundary crosses it, separating the parts that fall inside the polygon from those that fall outside, using the default tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolygon2 cutter, out GeoLine2[] inside, out GeoLine2[] outside)
Parameters
subjectGeoLine2The line segment to split.
cutterGeoPolygon2The polygon to split against.
insideGeoLine2[]The parts lying inside the polygon, in order along the subject.
outsideGeoLine2[]The parts lying outside the polygon, in order along the subject.
Returns
- bool
true if the polygon boundary crosses the subject; otherwise, false.
TrySplitBy(GeoLine2, GeoPolygon2, out GeoLine2[], out GeoLine2[], Tolerance)
Splits a line segment where a polygon boundary crosses it, separating the parts that fall inside the polygon from those that fall outside, within tolerance.
public static bool TrySplitBy(GeoLine2 subject, GeoPolygon2 cutter, out GeoLine2[] inside, out GeoLine2[] outside, Tolerance tolerance)
Parameters
subjectGeoLine2The line segment to split.
cutterGeoPolygon2The polygon to split against.
insideGeoLine2[]The parts lying inside the polygon, in order along the subject.
outsideGeoLine2[]The parts lying outside the polygon, in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polygon boundary crosses the subject; false when it does not, which is not a failure: one array then holds the whole subject and the other is empty, according to which side the subject lies on.
Remarks
A part running along the polygon boundary counts as inside, matching Contains(GeoPolygon2, GeoPoint2, Tolerance), which treats the boundary as part of the polygon.
TrySplitBy(GeoPolyline2, GeoPolygon2, out GeoPolyline2[], out GeoPolyline2[])
Splits a polyline where a polygon boundary crosses it, separating the parts that fall inside the polygon from those that fall outside, using the default tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPolygon2 cutter, out GeoPolyline2[] inside, out GeoPolyline2[] outside)
Parameters
subjectGeoPolyline2The polyline to split.
cutterGeoPolygon2The polygon to split against.
insideGeoPolyline2[]The sub-polylines lying inside the polygon, in order along the subject.
outsideGeoPolyline2[]The sub-polylines lying outside the polygon, in order along the subject.
Returns
- bool
true if the polygon boundary crosses the subject; otherwise, false.
TrySplitBy(GeoPolyline2, GeoPolygon2, out GeoPolyline2[], out GeoPolyline2[], Tolerance)
Splits a polyline where a polygon boundary crosses it, separating the parts that fall inside the polygon from those that fall outside, within tolerance.
public static bool TrySplitBy(GeoPolyline2 subject, GeoPolygon2 cutter, out GeoPolyline2[] inside, out GeoPolyline2[] outside, Tolerance tolerance)
Parameters
subjectGeoPolyline2The polyline to split.
cutterGeoPolygon2The polygon to split against.
insideGeoPolyline2[]The sub-polylines lying inside the polygon, in order along the subject.
outsideGeoPolyline2[]The sub-polylines lying outside the polygon, in order along the subject.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polygon boundary crosses the subject; false when it does not, which is not a failure: one array then holds the subject itself and the other is empty.
Remarks
A segment running along the polygon boundary counts as inside, matching Contains(GeoPolygon2, GeoPoint2, Tolerance).