Method Flatten
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Flatten()
Gets the loop with its arcs thrown away, leaving the chords.
public GeoPolygon3 Flatten()
Returns
Remarks
Each arc becomes the straight side between its ends, so the polygon has the loop's corners and no others, where Flatten() cuts each arc into pieces; ToPolygon3(double) follows the arcs to an accuracy asked for. Every corner is kept, however short a side: at a millionth, the rectangle 100 by 50 standing in the plane x = 20 and filleted at 0.0005 flattens to its eight corners, where it was put back together within the global tolerance of a thousandth and came back four. The polygon is still checked flat and enclosing an area within the global tolerance, as the constructor of GeoPolygon3 checks it: the half disc of radius 1 built at a millionth with its diameter bent to (1, 0.000002, 0), whose three corners enclose a sliver of 0.000002 square units, is refused as the polygon of those corners is, where it flattened to the sliver.
Exceptions
- ArgumentException
Thrown when the corners do not lie flat or enclose no area within the global tolerance.