Checks the list of points for various flaws and returns a Name indicating the status. The correct result is :normal. Only :normal polygons are proper arguments to the polygon functions. Potential problems are:
Polygons are represented in a "lightweight" way by a list of points . The first three non-colinear points define the "plane" of the polygon, even if the rest of the points do not lie in that plane, they will be projected onto that plane for all computations.
polygonCheck ( points As List ) As Name
Argument | Type | Description |
---|---|---|
points | List | The polygon to be checked. |
Intent >polygonCheck({Point(0,0,0), Point(2,0,0), Point(2,2,0)}) --> :normal
Intent >polygonCheck({Point(0,0,0), Point(2,0,0)}) --> :TooFewPoints
Intent >polygonCheck({Point(0,0,0), Point(2,0,0), Point(2,2,0), Point(2,0,0), Point(3,3,0)}) --> :NonSimplePolygon
Intent >polygonCheck({Point(0,0,0), Point(4,0,0), Point(4,4,0), Point(2,-1,0), Point(0,4,0)}) --> :SelfIntersectingPolygon