-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathant_nest.scad
168 lines (127 loc) · 3.23 KB
/
ant_nest.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
use <chamfer.scad>;
glass_width = 26;
glass_height = 76;
glass_depth = 1.3;
glass_offset = 0.2;
glass_overlap = 1;
water_tank_width = 2.5;
water_gap_width = 1;
water_gap_depth = 0.5;
food_hole_size = 10;
air_gap_size = 0.5;
depth = 15;
wall = 3;
case_offset = 0.2;
case_size = 5;
eleleg = 1;
length = glass_height+wall*3-glass_overlap*2+water_tank_width;
width = glass_width+wall*2-glass_overlap*2;
difference(){
base();
food_block();
}
translate([0,-1,0])
intersection(){
base();
food_block();
}
//case();
module case(){
difference(){
translate([-case_size-case_offset,-case_size-case_offset,-case_size/2])
cube([
width+case_offset*2+case_size*2,
length+case_offset*2+case_size*2,
case_size
]);
cube([
width+case_offset*2,
length+case_offset*2,
depth+wall+wall
]);
}
}
module food_block(){
cube([
glass_width+wall*2-glass_overlap*2,
glass_width+wall-glass_overlap,
depth+wall+wall
]);
}
module eleleg_cut(){
translate([width/2,glass_width+wall-glass_overlap,0])
rotate([45,0,0])
cube([
width,
eleleg,
eleleg
], true);
}
module tube(){
translate([width/2,1,depth/2+wall])
rotate([90,0,0])
cylinder(
wall,
5.5/2,
6/2,
center=true,
$fn=40
);
}
module base(){
difference(){
chamfered_cube([
width,
length,
depth+wall+wall
], eleleg);
eleleg_cut();
translate([0,0,depth+wall+wall])
eleleg_cut();
//water tank
translate([wall,glass_height+wall*2-glass_overlap*2,wall])
cube([
glass_width-glass_overlap*2,
water_tank_width,
depth+wall+wall
]);
//water gap
#translate([wall*2,glass_height+wall-glass_overlap*2-water_gap_width,wall-water_gap_depth])
cube([
glass_width-glass_overlap*2-wall*2,
water_tank_width+water_gap_width+wall,
water_gap_depth
]);
#tube();
//air gap
for(i=[wall*2.5:wall*2:wall*26]){
translate([-0.5,i,wall*2])
cube([
glass_width+wall*2,
air_gap_size,
depth/2
]);
}
// food hole
#translate([
wall-glass_overlap+(glass_width-18)/2,
wall+(glass_width-18)/2-glass_overlap,
wall-water_gap_depth])
cube([18+glass_offset*2, 21.6+glass_offset*2, 1]);
translate([wall,wall,wall])
cube([
glass_width-glass_overlap*2,
glass_height-glass_overlap*2,
depth+wall+wall+1
]);
translate([
wall-glass_overlap-glass_offset,
wall-glass_overlap-glass_offset,
wall+depth])
cube([
glass_width+glass_offset*2,
glass_height+glass_offset*2,
glass_depth+glass_offset*2
]);
}
}