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
cutterGeoLine2leftGeoPolygon2[]rightGeoPolygon2[]
Returns
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
cutterGeoLine2leftGeoPolygon2[]rightGeoPolygon2[]toleranceTolerance
Returns
TrySplitBy(GeoPolyline2, out GeoPolygon2[])
Cuts the loop in two along a chain drawn across it.
public bool TrySplitBy(GeoPolyline2 cutLine, out GeoPolygon2[] pieces)
Parameters
cutLineGeoPolyline2piecesGeoPolygon2[]
Returns
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
cutLineGeoPolyline2piecesGeoPolygon2[]toleranceTolerance