Table of Contents

Class Cutting

Namespace
SpatialNET
Assembly
SpatialNET.Extensions.dll

Cut according to ADR 0007: a flat list of the pieces without left/right. Cut pieces are one element each; all untouched parts or paths together form one element and keep their original coordinates (without snap rounding). If nothing is cut, the list contains exactly one element. The cutting line is not extended; Z and M at intersection points are interpolated on the original segment (ADR 0005, ADR 0015).

public static class Cutting

Inheritance

Inherited Members

Methods

Cut(IPolygon2D, IPolyline2D, IGeometryFactory?, double?)

Splits the polygon along the cutting line: only complete crossings cut; loose ends, runs along the boundary and touches at vertices do not. Holes are distributed over the pieces accordingly.

public static IReadOnlyList<IPolygon2D> Cut(this IPolygon2D polygon, IPolyline2D cutter, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

polygon IPolygon2D

The polygon.

cutter IPolyline2D

The cutting line; all paths cut.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IReadOnlyList<IPolygon2D>

Exceptions

ArgumentNullException

An argument is null.

Cut(IPolyline2D, IPolyline2D, IGeometryFactory?, double?)

Splits the polyline at every contact with the cutting line (crossing, touch, start and end of an overlap). Each cut piece is a polyline with exactly one path.

public static IReadOnlyList<IPolyline2D> Cut(this IPolyline2D polyline, IPolyline2D cutter, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

polyline IPolyline2D

The polyline.

cutter IPolyline2D

The cutting line; all paths cut.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IReadOnlyList<IPolyline2D>

Exceptions

ArgumentNullException

An argument is null.