forked from benpeart/kaleidoscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHoneycomb-notched.scad
182 lines (107 loc) · 6.02 KB
/
Honeycomb-notched.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// everything has to be a factor of 0.4m
stroke = 2;
notch_width = 20.5;
notch_depth = 1;
distance_apart = 33 + 1/3;
wall_depth = 20;
triangle_height = (distance_apart * sqrt(3)) / 2;
num_rings = 10;
radius = distance_apart * num_rings;
diffuser_thickness = 0.4;
standoff_distance_from_edge = 2;
standoff_height = 5;
standoff_radius = 2;
standoff_length = 5; // this is how far out the standoff is from the backplate_chin
countersink_radius = 8;
countersink_depth = 2;
backplate_thickness = 5;
fudge = 1;
//diffuser();
//honeycomb();
//backplate_honeycomb();
backplate_chin();
module honeycomb()
{
difference()
{
rotate(30) cylinder(h=wall_depth, r=radius /*+ stroke / 2*/, $fn=6);
for (i = [num_rings / 2 - 1:-1:(-2 * num_rings) + (num_rings / 2)]) // draws the square
{
orgin = [triangle_height * -10, distance_apart * i + (triangle_height - notch_width) / 2, wall_depth - notch_depth];
//the + 1 is needed to finish the etch
translate(orgin) rotate(30)cube([distance_apart * (num_rings * 2 + 1), notch_width, notch_depth + fudge]);
}
for (y = [num_rings:-1:-num_rings])
{
for (x = [-num_rings:2:num_rings])
{
translate([x * triangle_height + (triangle_height * (2/3)), y * distance_apart, -2]) rotate(60) cylinder (h=wall_depth+4, r=(triangle_height* 2/3) - stroke, $fn=3);
translate([x * triangle_height - (triangle_height * (2/3)), y * distance_apart, -2]) rotate(0) cylinder (h= wall_depth+4, r=(triangle_height* 2/3) - stroke, $fn=3);
translate([(x+1) * triangle_height + (triangle_height * (2/3)), (y) * distance_apart + distance_apart / 2, -2]) rotate(60) cylinder (h=wall_depth+4, r=(triangle_height* 2/3) - stroke, $fn=3);
translate([(x+1) * triangle_height - (triangle_height * (2/3)), (y) * distance_apart + distance_apart / 2, -2]) rotate(0) cylinder (h=wall_depth+4, r=(triangle_height* 2/3) - stroke, $fn=3);
}
}
//trimming for print
/*
translate([0,0,-5]) rotate(60) cube([1000,1000,100]);
translate([0,0,-5]) rotate(120) cube([1000,1000,100]);
translate([0,0,-5]) rotate(180) cube([1000,1000,100]);
translate([0,0,-5]) rotate(-0) cube([1000,1000,100]);
translate([0,0,-5]) rotate(-30) cube([1000,1000,100]);
translate([0,-7 * distance_apart,-1]) rotate(30) cube([1000,1000,100]);
translate([0,-6 * distance_apart,-1]) rotate(-30) cube([1000,1000,100]);
*/
}
}
module diffuser() difference() //union()
{
translate([0,0,-diffuser_thickness])rotate(30) cylinder(h=diffuser_thickness, r=radius /* + stroke / 2 */, $fn=6);
/*
translate([0,0,-5]) rotate(60) cube([1000,1000,100]);
translate([0,0,-5]) rotate(120) cube([1000,1000,100]);
translate([0,0,-5]) rotate(180) cube([1000,1000,100]);
translate([0,0,-5]) rotate(-0) cube([1000,1000,100]);
translate([0,0,-5]) rotate(-30) cube([1000,1000,100]);
translate([0,-7 * distance_apart,-1]) rotate(30) cube([1000,1000,100]);
translate([0,-6 * distance_apart,-1]) rotate(-30) cube([1000,1000,100]);
*/
}
module backplate_honeycomb()
{
// draw the backplate
translate([0, 0, wall_depth + standoff_height]) rotate(30) cylinder(h=backplate_thickness, r=radius /*+ stroke / 2*/, $fn=6);
}
module backplate_chin()
{
rotate(30) cylinder(h=backplate_thickness, r=radius /*+ stroke / 2*/, $fn=6);
// make the standoffs
union()
{
// center
translate([0, 0, backplate_thickness]) cylinder(h=standoff_length, r=countersink_radius, $fn=100);
}
difference()
{
// drill the holes for the screws and the countersinks
// top center
translate([0, distance_apart * (num_rings - standoff_distance_from_edge), 0]) cylinder(h=standoff_height, r=standoff_radius, $fn=100);
translate([0, distance_apart * (num_rings - standoff_distance_from_edge), 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
// top right
translate([triangle_height * (num_rings - standoff_distance_from_edge), distance_apart * num_rings / 2, 0]) cylinder(h=standoff_height, r=standoff_radius, $fn=100);
translate([triangle_height * (num_rings - standoff_distance_from_edge), distance_apart * num_rings / 2, 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
// bottom right
translate([triangle_height * (num_rings - standoff_distance_from_edge), -distance_apart * num_rings / 2, 0]) cylinder(h=standoff_height, r=standoff_radius, $fn=100);
translate([triangle_height * (num_rings - standoff_distance_from_edge), -distance_apart * num_rings / 2, 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
// bottom center
translate([0, -distance_apart * (num_rings - standoff_distance_from_edge), 0]) cylinder(h=standoff_height, r=standoff_radius, $fn=100);
translate([0, -distance_apart * (num_rings - standoff_distance_from_edge), 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
// bottom left
translate([-triangle_height * (num_rings - standoff_distance_from_edge), -distance_apart * num_rings / 2, 0]) cylinder(h=standoff_height, r=standoff_radius, $fn=100);
translate([-triangle_height * (num_rings - standoff_distance_from_edge), -distance_apart * num_rings / 2, 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
// top left
translate([-triangle_height * (num_rings - standoff_distance_from_edge), distance_apart * num_rings / 2, 0]) cylinder(h=standoff_height, r=standoff_radius, $fn=100);
translate([-triangle_height * (num_rings - standoff_distance_from_edge), distance_apart * num_rings / 2, 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
// center
translate([0, 0, 0]) cylinder(h=countersink_depth, r=countersink_radius, $fn=100);
}
}