Geom.polygon()
Description
2D Polygon in the XOY plane with center at point [0,0,0].
Syntax
JSGeom.polygon(points: Array<Point3>) -> Shape
Parameters
Parameter |
Type |
Default Value |
Mandatory |
Description |
points |
Array<Point3> |
— |
 |
Array of polygon vertices. |
Return value
Type |
Description |
Shape |
Object of type Shape , representing the polygon. |
Example
JS |
---|
| let s = Geom.polygon([Geom.point3(0,0,0), Geom.point3(1,0,0), Geom.point3(1,1,0), Geom.point3(0,1,0), Geom.point3(0,0,0)]);
console.info(s);
|
Last update: 14 August 2025, 18:47