1include<../std.scad>
 2include<../polyhedra.scad>
 3
 4
 5if (true) {
 6
 7   $fn=96;
 8
 9  // Display of all solids with insphere, midsphere and circumsphere
10    
11  for(i=[0:len(_polyhedra_)-1]) {
12    move_copies([[3*i,0,0]])              // Plain polyhedron
13      regular_polyhedron(index=i, mr=1,facedown=true);
14    move_copies([[3*i,3.5,0]]){           // Inner radius means sphere touches faces of the polyhedron
15      sphere(r=1.005);                     // Sphere is slightly oversized so you can see it poking out from each face
16      %regular_polyhedron(index=i, ir=1,facedown=true);
17      }
18    move_copies([[3*i,7,0]]){             // Mid radius means the sphere touches the center of each edge
19      sphere(r=1);
20      %regular_polyhedron(index=i, mr=1,facedown=true);
21      }
22    move_copies([[3*i,11,0]]){            // outer radius means points of the polyhedron are on the sphere
23      %sphere(r=.99);                      // Slightly undersized sphere means the points poke out a bit
24      regular_polyhedron(index=i, or=1,facedown=true);
25      }
26    }
27}
28
29
30
31///////////////////////////////////////////////////////////////////////////////////////////////////
32//
33// Examples start here: not part of library
34
35
36
37/*
38// Test that rounded shapes are the same size as unrounded
39shape = "dodecahedron";
40//shape = "cube";
41top_half(cp=[0,0,.2])
42difference(){
43    regular_polyhedron(shape);
44    regular_polyhedron(shape, rounding=0.2,side=1.0000);
45}
46*/