Table of Contents

Method Join

Namespace
GeometryHelper.Extension
Assembly
GeometryHelper.dll

Join(IEnumerable<GeoLine2>)

Joins segments into chains by matching their endpoints, as a drafting program's JOIN does.

public static GeoPolyline2[] Join(this IEnumerable<GeoLine2> lines)

Parameters

lines IEnumerable<GeoLine2>

Returns

GeoPolyline2[]

Join(IEnumerable<GeoLine2>, Tolerance)

Joins segments into chains by matching their endpoints, within a tolerance.

public static GeoPolyline2[] Join(this IEnumerable<GeoLine2> lines, Tolerance tolerance)

Parameters

lines IEnumerable<GeoLine2>

The segments, in any order and pointing either way.

tolerance Tolerance

The tolerance: two ends nearer than this count as meeting.

Returns

GeoPolyline2[]

One chain for every unbroken run, with redundant junctions between collinear pieces removed.

Remarks

Where three or more segments meet at a point, which one a run takes up is settled by input order: at a fork there is no geometric reason to prefer one branch. The answer is the same every time for a given input, but reordering the input can move a branch from one run to another.

Exceptions

ArgumentNullException

Thrown when lines is null.

Join(IEnumerable<GeoLine3>)

Joins segments into chains by matching their endpoints.

public static GeoPolyline3[] Join(this IEnumerable<GeoLine3> lines)

Parameters

lines IEnumerable<GeoLine3>

Returns

GeoPolyline3[]

Join(IEnumerable<GeoLine3>, Tolerance)

Joins segments into chains by matching their endpoints, within a tolerance.

public static GeoPolyline3[] Join(this IEnumerable<GeoLine3> lines, Tolerance tolerance)

Parameters

lines IEnumerable<GeoLine3>

The segments, in any order and pointing either way.

tolerance Tolerance

The tolerance: two ends nearer than this count as meeting.

Returns

GeoPolyline3[]

One chain for every unbroken run.

Exceptions

ArgumentNullException

Thrown when lines is null.

Join(IEnumerable<GeoPolyline3>)

Joins chains into longer chains by matching their ends.

public static GeoPolyline3[] Join(this IEnumerable<GeoPolyline3> polylines)

Parameters

polylines IEnumerable<GeoPolyline3>

Returns

GeoPolyline3[]

Join(IEnumerable<GeoPolyline3>, Tolerance)

Joins chains into longer chains by matching their ends, within a tolerance.

public static GeoPolyline3[] Join(this IEnumerable<GeoPolyline3> polylines, Tolerance tolerance)

Parameters

polylines IEnumerable<GeoPolyline3>

The chains, in any order and running either way.

tolerance Tolerance

The tolerance.

Returns

GeoPolyline3[]

One chain for every unbroken run.

Exceptions

ArgumentNullException

Thrown when polylines is null.