Table of Contents

Method TrySplitAtDistance

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TrySplitAtDistance(GeoPolylineArc2, double, out GeoPolylineArc2, out GeoPolylineArc2)

Cuts a chain that may curve in two at a distance along it.

public static bool TrySplitAtDistance(GeoPolylineArc2 chain, double distance, out GeoPolylineArc2 first, out GeoPolylineArc2 second)

Parameters

chain GeoPolylineArc2

The chain to cut.

distance double

How far along to cut, in drawing units.

first GeoPolylineArc2

The piece from the start of the chain to the cut.

second GeoPolylineArc2

The piece from the cut to the end of the chain.

Returns

bool

true when the chain was cut in two; false when the distance falls at an end or off it.

Exceptions

ArgumentNullException

Thrown when the chain is null.

TrySplitAtDistance(GeoPolylineArc2, double, out GeoPolylineArc2, out GeoPolylineArc2, Tolerance)

Cuts a chain that may curve in two at a distance along it, within a tolerance.

public static bool TrySplitAtDistance(GeoPolylineArc2 chain, double distance, out GeoPolylineArc2 first, out GeoPolylineArc2 second, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
distance double
first GeoPolylineArc2
second GeoPolylineArc2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the chain is null.

TrySplitAtDistance(GeoLine2, double, out GeoLine2, out GeoLine2)

Splits a line segment at an arc length measured from its start point, using the default tolerance.

public static bool TrySplitAtDistance(GeoLine2 line, double distance, out GeoLine2 first, out GeoLine2 second)

Parameters

line GeoLine2

The line segment to split.

distance double

Arc length from the start point.

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.

TrySplitAtDistance(GeoLine2, double, out GeoLine2, out GeoLine2, Tolerance)

Splits a line segment at an arc length measured from its start point, within tolerance.

public static bool TrySplitAtDistance(GeoLine2 line, double distance, out GeoLine2 first, out GeoLine2 second, Tolerance tolerance)

Parameters

line GeoLine2

The line segment to split.

distance double

Arc length from the start point.

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 distance falls outside the segment or lands on one of its endpoints.

TrySplitAtDistance(GeoPolyline2, double, out GeoPolyline2, out GeoPolyline2)

Splits a polyline at an arc length measured from its first vertex, using the default tolerance.

public static bool TrySplitAtDistance(GeoPolyline2 polyline, double distance, out GeoPolyline2 first, out GeoPolyline2 second)

Parameters

polyline GeoPolyline2

The polyline to split.

distance double

Arc length from the first vertex.

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.

TrySplitAtDistance(GeoPolyline2, double, out GeoPolyline2, out GeoPolyline2, Tolerance)

Splits a polyline at an arc length measured from its first vertex, within tolerance.

public static bool TrySplitAtDistance(GeoPolyline2 polyline, double distance, out GeoPolyline2 first, out GeoPolyline2 second, Tolerance tolerance)

Parameters

polyline GeoPolyline2

The polyline to split.

distance double

Arc length from the first vertex.

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 distance falls outside the polyline or lands on one of its endpoints.