meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:design_guide_polygon [2020/12/08 06:48] JSCAD Editor |
en:design_guide_polygon [2022/05/03 06:53] (current) JSCAD Editor |
||
---|---|---|---|
Line 6: | Line 6: | ||
// | // | ||
+ | |||
+ | //NOTE: The ordering of points is VERY IMPORTANT. If the polygon is going to be extruded then the points must be in counter-clockwise order, otherwise the faces of the object will be facing inwards. See [[en: | ||
+ | |||
+ | //HINT: Polygons should have a positive area.// | ||
The following show examples of creating polygons from a list of points. | The following show examples of creating polygons from a list of points. | ||
Line 13: | Line 17: | ||
<code javascript> | <code javascript> | ||
- | const myshape = polygon([ [0, | + | const { polygon |
const myshape = polygon({ points: [ [0, | const myshape = polygon({ points: [ [0, | ||
</ | </ | ||