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
chainGeoPolylineArc2The chain to cut.
distancedoubleHow far along to cut, in drawing units.
firstGeoPolylineArc2The piece from the start of the chain to the cut.
secondGeoPolylineArc2The 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
chainGeoPolylineArc2distancedoublefirstGeoPolylineArc2secondGeoPolylineArc2toleranceTolerance
Returns
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
lineGeoLine2The line segment to split.
distancedoubleArc length from the start point.
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.
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
lineGeoLine2The line segment to split.
distancedoubleArc length from the start point.
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 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
polylineGeoPolyline2The polyline to split.
distancedoubleArc length from the first vertex.
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.
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
polylineGeoPolyline2The polyline to split.
distancedoubleArc length from the first vertex.
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 distance falls outside the polyline or lands on one of its endpoints.