Table of Contents

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

chain GeoPolylineArc2
point GeoPoint2
first GeoPolylineArc2
second GeoPolylineArc2

Returns

bool

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

chain GeoPolylineArc2
point GeoPoint2
first GeoPolylineArc2
second GeoPolylineArc2
tolerance Tolerance

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

chain GeoPolylineArc2
cutter GeoLine2
pieces GeoPolylineArc2[]

Returns

bool

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

chain GeoPolylineArc2
cutter GeoLine2
pieces GeoPolylineArc2[]
tolerance Tolerance

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

chain GeoPolylineArc2
cutter GeoArc2
pieces GeoPolylineArc2[]

Returns

bool

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

chain GeoPolylineArc2
cutter GeoArc2
pieces GeoPolylineArc2[]
tolerance Tolerance

Returns

bool

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

chain GeoPolylineArc2
cutter GeoPolygon2
pieces GeoPolylineArc2[]

Returns

bool

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

chain GeoPolylineArc2
cutter GeoPolygon2
pieces GeoPolylineArc2[]
tolerance Tolerance

Returns

bool

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

chain GeoPolylineArc2
cutter GeoPolygonArc2
pieces GeoPolylineArc2[]

Returns

bool

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

chain GeoPolylineArc2
cutter GeoPolygonArc2
pieces GeoPolylineArc2[]
tolerance Tolerance

Returns

bool

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

loop GeoPolygonArc2
cutter GeoLine2
pieces GeoPolylineArc2[]

Returns

bool

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

loop GeoPolygonArc2
cutter GeoLine2
pieces GeoPolylineArc2[]
tolerance Tolerance

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

loop GeoPolygonArc2
cutter GeoPolygon2
pieces GeoPolylineArc2[]

Returns

bool

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

loop GeoPolygonArc2
cutter GeoPolygon2
pieces GeoPolylineArc2[]
tolerance Tolerance

Returns

bool

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

chain GeoPolylineArc2
points GeoPoint2[]
pieces GeoPolylineArc2[]

Returns

bool

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

chain GeoPolylineArc2
points GeoPoint2[]
pieces GeoPolylineArc2[]
tolerance Tolerance

Returns

bool

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

polygon GeoPolygon2
cutter GeoLine2
left GeoPolygon2[]
right GeoPolygon2[]

Returns

bool

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

polygon GeoPolygon2

The loop to cut.

cutter GeoLine2

A segment, read as the whole straight line through it; its length is ignored.

left GeoPolygon2[]

The pieces on the left of the cutter's direction of travel.

right GeoPolygon2[]

The pieces on its right.

tolerance Tolerance

The 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

face GeoFace2
cutter GeoLine2
left GeoFace2[]
right GeoFace2[]

Returns

bool

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

face GeoFace2

The face to cut, holes and all.

cutter GeoLine2

A segment, read as the whole straight line through it; its length is ignored.

left GeoFace2[]

The pieces on the left of the cutter's direction of travel.

right GeoFace2[]

The pieces on its right.

tolerance Tolerance

The 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

subject GeoPolygon2
cutLine GeoPolyline2
pieces GeoPolygon2[]

Returns

bool

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

subject GeoPolygon2

The loop to cut.

cutLine GeoPolyline2

The 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.

pieces GeoPolygon2[]

The two pieces, or the loop alone.

tolerance Tolerance

The 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

line GeoLine2

The line segment to split.

point GeoPoint2

The point to split at, which must lie on the segment.

first GeoLine2

The piece holding the start point of the segment.

second GeoLine2

The 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

line GeoLine2

The line segment to split.

point GeoPoint2

The point to split at, which must lie on the segment.

first GeoLine2

The piece holding the start point of the segment.

second GeoLine2

The piece holding the end point of the segment.

tolerance Tolerance

The 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

polyline GeoPolyline2

The polyline to split.

point GeoPoint2

The point to split at, which must lie on the polyline.

first GeoPolyline2

The piece holding the start point of the polyline.

second GeoPolyline2

The 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

polyline GeoPolyline2

The polyline to split.

point GeoPoint2

The point to split at, which must lie on the polyline.

first GeoPolyline2

The piece holding the start point of the polyline.

second GeoPolyline2

The piece holding the end point of the polyline.

tolerance Tolerance

The 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

subject GeoLine2

The line segment to split.

cutter GeoLine2

The cutting line segment.

first GeoLine2

The piece holding the start point of the subject.

second GeoLine2

The 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

subject GeoLine2

The line segment to split.

cutter GeoLine2

The cutting line segment.

first GeoLine2

The piece holding the start point of the subject.

second GeoLine2

The piece holding the end point of the subject.

tolerance Tolerance

The 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

subject GeoLine2

The line segment to split.

cutters GeoLine2[]

The cutting line segments.

pieces GeoLine2[]

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

subject GeoLine2

The line segment to split.

cutters GeoLine2[]

The cutting line segments.

pieces GeoLine2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoLine2

The line segment to split.

cutter GeoPolyline2

The cutting polyline.

pieces GeoLine2[]

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

subject GeoLine2

The line segment to split.

cutter GeoPolyline2

The cutting polyline.

pieces GeoLine2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoLine2

The line segment to split.

points GeoPoint2[]

The points to split at.

pieces GeoLine2[]

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

subject GeoLine2

The line segment to split.

points GeoPoint2[]

The points to split at.

pieces GeoLine2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoLine2
cutters GeoPolygon2[]
inside GeoLine2[]
outside GeoLine2[]

Returns

bool

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

subject GeoLine2

The line segment to be split.

cutters GeoPolygon2[]

The array of polygons that cross the line segment.

inside GeoLine2[]

The portions of the line segment that fall inside the polygons.

outside GeoLine2[]

The portions of the line segment that fall outside the polygons.

tolerance Tolerance

The 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

subject GeoLine2

The line segment to split.

cutters GeoPolyline2[]

The cutting polylines.

pieces GeoLine2[]

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

subject GeoLine2

The line segment to split.

cutters GeoPolyline2[]

The cutting polylines.

pieces GeoLine2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoPolyline2

The polyline to split.

cutter GeoLine2

The cutting line segment.

pieces GeoPolyline2[]

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

subject GeoPolyline2

The polyline to split.

cutter GeoLine2

The cutting line segment.

pieces GeoPolyline2[]

The pieces in order along the subject if split succeeds.

tolerance Tolerance

The 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

subject GeoPolyline2

The polyline to split.

points GeoPoint2[]

The points to split at.

pieces GeoPolyline2[]

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

subject GeoPolyline2

The polyline to split.

points GeoPoint2[]

The points to split at.

pieces GeoPolyline2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoPolyline2

The polyline to split.

cutters GeoLine2[]

The cutting line segments.

pieces GeoPolyline2[]

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

subject GeoPolyline2

The polyline to split.

cutters GeoLine2[]

The cutting line segments.

pieces GeoPolyline2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoPolyline2

The polyline to split.

cutters GeoPolyline2[]

The cutting polylines.

pieces GeoPolyline2[]

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

subject GeoPolyline2

The polyline to split.

cutters GeoPolyline2[]

The cutting polylines.

pieces GeoPolyline2[]

The resulting pieces in order along the subject.

tolerance Tolerance

The 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

subject GeoPolyline2

The polyline to be split.

cutters GeoPolygon2[]

The array of polygons that cross the polyline.

inside GeoPolyline2[]

The portions of the polyline that fall inside the polygons.

outside GeoPolyline2[]

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

subject GeoPolyline2

The polyline to be split.

cutters GeoPolygon2[]

The array of polygons that cross the polyline.

inside GeoPolyline2[]

The portions of the polyline that fall inside the polygons.

outside GeoPolyline2[]

The portions of the polyline that fall outside the polygons.

tolerance Tolerance

The 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

subject GeoLine2

The line segment to split.

cutter GeoPolygon2

The polygon to split against.

inside GeoLine2[]

The parts lying inside the polygon, in order along the subject.

outside GeoLine2[]

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

subject GeoLine2

The line segment to split.

cutter GeoPolygon2

The polygon to split against.

inside GeoLine2[]

The parts lying inside the polygon, in order along the subject.

outside GeoLine2[]

The parts lying outside the polygon, in order along the subject.

tolerance Tolerance

The 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

subject GeoPolyline2

The polyline to split.

cutter GeoPolygon2

The polygon to split against.

inside GeoPolyline2[]

The sub-polylines lying inside the polygon, in order along the subject.

outside GeoPolyline2[]

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

subject GeoPolyline2

The polyline to split.

cutter GeoPolygon2

The polygon to split against.

inside GeoPolyline2[]

The sub-polylines lying inside the polygon, in order along the subject.

outside GeoPolyline2[]

The sub-polylines lying outside the polygon, in order along the subject.

tolerance Tolerance

The 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).