dodecahedron test

This commit is contained in:
Trammell Hudson 2015-01-25 18:09:17 -05:00
parent d10a21ac3b
commit ee6e001c73
2 changed files with 47 additions and 0 deletions

26
dodecahedron-corner.scad Normal file
View File

@ -0,0 +1,26 @@
module corner()
{
translate([0,0,2]) rotate([90,0,0])
render() difference()
{
rotate([0,-10,70])
render() difference()
{
sphere(r=8); // 0 0x972e1c0
rotate([0,31.717371,18.000074]) translate([0,0,22.451374+2]) cube([3.000000,3.000000,44.902748], center=true);
rotate([0,121.717476,-53.999996]) translate([0,0,22.451399+2]) cube([3.000000,3.000000,44.902798], center=true);
rotate([0,121.717476,90.000000]) translate([0,0,22.451399+2]) cube([3.000000,3.000000,44.902798], center=true);
}
translate([0,-12,0]) cube([20,20,20], center=true);
}
}
for(x=[0:2])
{
for(y=[0:1])
{
translate([x*18,y*18,0]) corner();
}
}

21
dodecahedron.scad Normal file
View File

@ -0,0 +1,21 @@
//create a dodecahedron by intersecting 6 boxes
module dodecahedron(height)
{
scale([height,height,height]) //scale by height parameter
{
intersection(){
//make a cube
cube([2,2,1], center = true);
intersection_for(i=[0:4]) //loop i from 0 to 4, and intersect results
{
//make a cube, rotate it 116.565 degrees around the X axis,
//then 72*i around the Z axis
rotate([0,0,72*i])
rotate([116.565,0,0])
cube([2,2,1], center = true);
}
}
}
}
dodecahedron(100);