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/01 04:13] 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> | ||
- | let p1 = polygon([ [0, | + | const { polygon |
- | let p2 = polygon({ points: [ [0, | + | |
+ | const myshape | ||
</ | </ | ||