/ src / polyhedra / geom_hexahedron.scad
geom_hexahedron.scad
 1  use <_impl/_geom_platonic_polyhedra.scad>
 2  
 3  function geom_hexahedron(radius, detail = 0) =
 4      let(
 5          t = 1 / sqrt(3),
 6          hexahedron_points = [
 7  			[t, t, t], [-t, t, t], [-t, -t, t], [t, -t, t],
 8              [t, t, -t], [-t, t, -t], [-t, -t, -t], [t, -t, -t]
 9  		],
10          hexahedron_faces = [
11              [0, 7, 3], [0, 4, 7], 
12              [1, 4, 0], [1, 5, 4],
13              [2, 6, 5], [2, 5, 1],
14              [3, 7, 6], [3, 6, 2],
15              [0, 3, 2], [0, 2, 1],
16              [5, 6, 7], [5, 7, 4]
17  		]
18      )
19  	_subdivide_project(hexahedron_points, hexahedron_faces, radius, detail);