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 [2021/05/12 08:18] JSCAD Editor |
en:design_guide_polygon [2022/05/03 06:53] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| // | // | ||
| - | 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: | + | //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 15: | Line 17: | ||
| <code javascript> | <code javascript> | ||
| + | const { polygon } = require(' | ||
| + | |||
| const myshape = polygon({ points: [ [0, | const myshape = polygon({ points: [ [0, | ||
| </ | </ | ||