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_polyhedron [2020/11/29 06:23] JSCAD Editor |
en:design_guide_polyhedron [2022/04/13 06:57] (current) rozek included "require" statement |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| // | // | ||
| - | Create a polyhedron from a list of ' | + | Create a polyhedron from a list of '' |
| + | |||
| + | //Note: The order of the points must be consistent, defining ' | ||
| <code javascript> | <code javascript> | ||
| - | let points = [ [10, 10, 0], [10, -10, 0], [-10, -10, 0], [-10, 10, 0], [0, 0, 10] ] | + | const { polyhedron } = require(' |
| - | let faces = [ [0, 1, 4], [1, 2, 4], [2, 3, 4], [3, 0, 4], [1, 0, 3], [2, 1, 3] ] | + | |
| - | let myshape = polyhedron({points, | + | const points = [ [10, 10, 0], [10, -10, 0], [-10, -10, 0], [-10, 10, 0], [0, 0, 10] ] |
| + | const faces = [ [0, 1, 4], [1, 2, 4], [2, 3, 4], [3, 0, 4], [1, 0, 3], [2, 1, 3] ] | ||
| + | const myshape = polyhedron({points, | ||
| </ | </ | ||