meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:design_guide_polyhedron [2020/11/29 06:31]
JSCAD Editor
en:design_guide_polyhedron [2022/04/13 06:57] (current)
rozek included "require" statement
Line 12: Line 12:
  
 <code javascript> <code javascript>
-let points = [ [10, 10, 0], [10, -10, 0], [-10, -10, 0], [-10, 10, 0], [0, 0, 10] ] +const { polyhedron } = require('@jscad/modeling').primitives 
-let faces = [ [0, 1, 4], [1, 2, 4], [2, 3, 4], [3, 0, 4], [1, 0, 3], [2, 1, 3] ] + 
-let myshape = polyhedron({points, faces, orientation: 'inward'})+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, faces, orientation: 'inward'})
 </code> </code>