Method Join
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Join(IEnumerable<GeoLine3>)
Reassembles a set of segments into chains, using the default tolerance.
public static GeoPolyline3[] Join(IEnumerable<GeoLine3> lines)
Parameters
linesIEnumerable<GeoLine3>
Returns
Join(IEnumerable<GeoLine3>, Tolerance)
Reassembles a set of segments into chains, within a tolerance.
public static GeoPolyline3[] Join(IEnumerable<GeoLine3> lines, Tolerance tolerance)
Parameters
linesIEnumerable<GeoLine3>toleranceTolerance
Returns
Join(IEnumerable<GeoPolyline3>)
Reassembles a set of chains into as few chains as possible, using the default tolerance.
public static GeoPolyline3[] Join(IEnumerable<GeoPolyline3> polylines)
Parameters
polylinesIEnumerable<GeoPolyline3>
Returns
Join(IEnumerable<GeoPolyline3>, Tolerance)
Reassembles a set of chains into as few chains as possible, within a tolerance.
public static GeoPolyline3[] Join(IEnumerable<GeoPolyline3> polylines, Tolerance tolerance)
Parameters
polylinesIEnumerable<GeoPolyline3>The pieces, in any order and running either way.
toleranceToleranceThe tolerance deciding whether two endpoints are the same point.
Returns
- GeoPolyline3[]
One chain per connected run of pieces.
Remarks
Each piece is used exactly once. Starting from an unused piece, the walk extends forwards from its end and then backwards from its start, reversing pieces as needed, until nothing more attaches; then the next unused piece starts a new chain. Where three or more pieces meet at a point the walk takes the first one it finds, since there is no ground for preferring another, so a branching set comes back as several chains rather than one.