//basic lego modules //six cube cube(size = [48, 28, 10], center = true); translate([-15,7,0]){ cylinder(8, r1=5, d2=2*5); } translate([0,7,0]){ cylinder(8, r1=5, d2=2*5); } translate([15,7,0]){ cylinder(8, r1=5, d2=2*5); } translate([-15,-7,0]){ cylinder(8, r1=5, d2=2*5); } translate([0,-7,0]){ cylinder(8, r1=5, d2=2*5); } translate([15,-7,0]){ cylinder(8, r1=5, d2=2*5); } //four cube translate([50,0,0]){ color([1,0,0]) cube(size = [28, 28, 10], center = true); } translate([57,7,0]){ color([1,0,0]) cylinder(8, r1=5, d2=2*5); } translate([42,7,0]){ color([1,0,0]) cylinder(8, r1=5, d2=2*5); } translate([57,-7,0]){ color([1,0,0]) cylinder(8, r1=5, d2=2*5); } translate([42,-7,0]){ color([1,0,0]) cylinder(8, r1=5, d2=2*5); } //eight cube translate([-70,0,0]){ color([0,0,1]) cube(size = [64, 14, 10], center = true); } translate([-48,0,0]){ color([0,0,1]) cylinder(8, r1=5, d2=2*5); } translate([-63,0,0]){ color([0,0,1]) cylinder(8, r1=5, d2=2*5); } translate([-78,0,0]){ color([0,0,1]) cylinder(8, r1=5, d2=2*5); } translate([-93,0,0]){ color([0,0,1]) cylinder(8, r1=5, d2=2*5); } //star difference(){ translate([0,50,0]){ cylinder(5,20,20,$fn=3); rotate([0,0,180]){ cylinder(5,20,20,$fn=3); } } translate([0,50,0]){ cylinder(10,15,10,$fn=3); rotate([0,0,180]){ cylinder(10,15,10,$fn=3); } } } //diamonds CubePoints = [ [ 0, -45, 0 ], //0 [ 0, -65, 0 ], //1 [ 10, -50, 0 ], //2 [-10, -50, 0 ], //3 [-10, -60, 0 ], //4 [ 10, -60, 0 ], //5 [ 0, -55, -10 ], //6 [ 8, -50, 4 ], //7 [-8, -50, 4 ], //8 [ 8, -60, 4 ], //9 [-8, -60, 4 ], //10 ]; CubeFaces = [ [0,2,6], [0,3,6], [1,4,6], [1,5,6], [2,5,6], [3,4,6], [7,8,10,9], [0,7,8], [0,2,7], [0,8,3], [1,9,5], [1,10,4], [1,9,10], [2,5,9,7], [3,4,10,8]]; polyhedron( CubePoints, CubeFaces );