The outer loop; by definition CCW about normal
Discrete inner loops, CW about normal
The plane of this polygon
3D to 2D "flattener" to this.plane
The total area of this polygon. So named because the area() method, which is not cached, already existed.
The set of Lines built from the boundary points. Use boundaryEdges2 to ensure the Lines are co-planar.
This is the edges quashed to the xform plane.
The set of Lines built from the hole points.
The returned value is normalized.
Convenience function to allow mixed use with objects like Profile.
Computes the area of this Polygon by triangulating and then summing the area of the triangles.
Area of this polygon.
Returns a copy of this.
Returns true if pt is inside or on the boundary of this polygon. If a point is inside a hole, it is considered outside. If the point is not exactly in the plane of the polygon, it is dropped onto it before testing.
The test point.
Boolean indicating inside.
A string of the form polygon[b:n, h:m]
Returns the GeoJSON for this polygon relative to xform.
Creates a "pie slice" shaped polygon.
Pie center
Pie normal
Pie radius
Direction from center to starting point
Direction from center to finishing point
Optional. Maximum allowed deviation from a true arc. Default is system global.
Creates an offset of this polygon. This does not handle holes.
Distance to offset (negative offsets inward/left)
Number of segments to use for outside corners (default 5)
An array of polygons.
Creates an offset of the boundary of this polygon. NOTE: This currently ignores holes in this polygon, but can produce holes in the output polygon(s).
Distances to offset (negative offsets inward/left)
One of "circular" (the default), "miter", or "bevel". Only the first letter is actually used.
Max deviation for arc approximation. Default is system global.
An array of polygons.
Performs a polygon boolean operation on another Polygon. This is the GeoJSON/Martinez version. This is obsolete.
The polygon to combine with this one
The boolean operation. One of 'union', 'intersection', or 'difference'. Actually only looks at the first letter.
Returns true if the this and poly can be considered the "same". They must have the same points, in the same order, but the first point does not need to be the same.
The poly to compare against.
Returns the triangulation of this as a MeshData object.
Polygon is a pure geometry object. It is used for geometric computations within rules. A Polygon can have a boundary and any number of holes, each described by a chain of Points. The polygon cannot contain internal islands. The points are stored both as Point objects as well as 2D GeoJSON x-y locations if demanded. A Polygon also stores its plane and "flattener" transform. A Polygon stores its boundary in CCW order relative to its normal, and holes are stored CW. Collinear points will NOT be removed from the boundary or holes. This is so that the author can rely on such points being kept if needed.