Table of Contents

Method TrySplitBy

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

TrySplitBy(GeoLine2, out GeoPolygon2[], out GeoPolygon2[])

Cuts the loop by the straight line through a segment.

public bool TrySplitBy(GeoLine2 cutter, out GeoPolygon2[] left, out GeoPolygon2[] right)

Parameters

cutter GeoLine2
left GeoPolygon2[]
right GeoPolygon2[]

Returns

bool

Remarks

The segment is read as the whole straight line through it, which is what a plane is to space, so its length is ignored: a segment crossing half the loop cuts all of it. Left and right are read from the segment's own direction, so reversing it swaps the two answers and nothing else.

TrySplitBy(GeoLine2, out GeoPolygon2[], out GeoPolygon2[], Tolerance)

Cuts the loop by the straight line through a segment, within a tolerance.

public bool TrySplitBy(GeoLine2 cutter, out GeoPolygon2[] left, out GeoPolygon2[] right, Tolerance tolerance)

Parameters

cutter GeoLine2
left GeoPolygon2[]
right GeoPolygon2[]
tolerance Tolerance

Returns

bool

TrySplitBy(GeoPolyline2, out GeoPolygon2[])

Cuts the loop in two along a chain drawn across it.

public bool TrySplitBy(GeoPolyline2 cutLine, out GeoPolygon2[] pieces)

Parameters

cutLine GeoPolyline2
pieces GeoPolygon2[]

Returns

bool

Remarks

Both ends of the chain have to sit on the boundary and everything between them has to stay inside, or nothing is cut. Unlike the line, this cutter is bounded: the pieces keep the chain's own vertices.

TrySplitBy(GeoPolyline2, out GeoPolygon2[], Tolerance)

Cuts the loop in two along a chain drawn across it, within a tolerance.

public bool TrySplitBy(GeoPolyline2 cutLine, out GeoPolygon2[] pieces, Tolerance tolerance)

Parameters

cutLine GeoPolyline2
pieces GeoPolygon2[]
tolerance Tolerance

Returns

bool