1.1 --- a/cartridge.scad Sun Jan 19 00:04:19 2014 +0100
1.2 +++ b/cartridge.scad Sun Jan 19 00:51:20 2014 +0100
1.3 @@ -23,6 +23,8 @@
1.4 width = 89.0;
1.5 height = 68.5;
1.6 depth = 16.5;
1.7 + front_depth = 6.5;
1.8 + back_depth = 11.0;
1.9
1.10 /* Details. */
1.11
1.12 @@ -36,7 +38,10 @@
1.13 top_label_depth = front_label_depth;
1.14 top_label_offset_from_front = 2.5;
1.15
1.16 - groove_depth = 1.0;
1.17 + groove_width = 2.5; /* how much the groove cuts out of the back */
1.18 + groove_depth = 1.0; /* how deep the groove goes into each side */
1.19 + top_groove_width = 1.0;
1.20 + top_groove_depth = 2.0;
1.21
1.22 back_cavity_width = 68.0;
1.23 back_cavity_inner_width = 65.0;
1.24 @@ -64,13 +69,21 @@
1.25
1.26 bottom_from_base = 13.5;
1.27
1.28 + edge_connector_cutout_front_offset = 1.0;
1.29 + edge_connector_cutout_front_depth = 1.0;
1.30 + edge_connector_cutout_front_width = 15.0;
1.31 + edge_connector_cutout_back_depth = 3.0;
1.32 + edge_connector_cutout_back_width = 57.0;
1.33 +
1.34 /* Side thicknesses. */
1.35
1.36 front = 2;
1.37 back = 3.5;
1.38 top = 3;
1.39 - left = 2;
1.40 - right = 2;
1.41 + front_left = 1;
1.42 + front_right = 1;
1.43 + back_left = 2;
1.44 + back_right = 2;
1.45 bottom = 2;
1.46
1.47 difference() {
1.48 @@ -78,18 +91,57 @@
1.49 /* The cartridge surfaces. */
1.50
1.51 union() {
1.52 - translate([0, -depth / 2 + front / 2, 0])
1.53 +
1.54 + /* Front portion. */
1.55 +
1.56 + translate([0, -front_depth + front / 2, 0])
1.57 cube([width, front, height], center = true);
1.58 - translate([0, depth / 2 - back / 2, 0])
1.59 + translate([-width / 2 + front_left / 2, -front_depth / 2, 0])
1.60 + cube([front_left, front_depth, height], center = true);
1.61 + translate([width / 2 - front_right / 2, -front_depth / 2, 0])
1.62 + cube([front_right, front_depth, height], center = true);
1.63 + translate([0, -front_depth / 2, height / 2 - top / 2])
1.64 + cube([width, front_depth, top], center = true);
1.65 + difference() {
1.66 + translate([0, -front_depth / 2,
1.67 + -height / 2 + bottom / 2 + bottom_from_base])
1.68 + cube([width, front_depth, bottom], center = true);
1.69 + translate([-width / 2 + edge_connector_cutout_front_offset +
1.70 + edge_connector_cutout_front_width / 2,
1.71 + -edge_connector_cutout_front_depth / 2,
1.72 + -height / 2 + bottom / 2 + bottom_from_base])
1.73 + cube([edge_connector_cutout_front_width,
1.74 + edge_connector_cutout_front_depth,
1.75 + bottom + extra], center = true);
1.76 + translate([width / 2 - edge_connector_cutout_front_offset -
1.77 + edge_connector_cutout_front_width / 2,
1.78 + -edge_connector_cutout_front_depth / 2,
1.79 + -height / 2 + bottom / 2 + bottom_from_base])
1.80 + cube([edge_connector_cutout_front_width,
1.81 + edge_connector_cutout_front_depth,
1.82 + bottom + extra], center = true);
1.83 + }
1.84 +
1.85 + /* Back portion. */
1.86 +
1.87 + translate([0, back_depth - back / 2, 0])
1.88 cube([width, back, height], center = true);
1.89 - translate([-width / 2 + left / 2, 0, 0])
1.90 - cube([left, depth, height], center = true);
1.91 - translate([width / 2 - right / 2, 0, 0])
1.92 - cube([right, depth, height], center = true);
1.93 - translate([0, 0, height / 2 - top / 2])
1.94 - cube([width, depth, top], center = true);
1.95 - translate([0, 0, -height / 2 + bottom / 2 + bottom_from_base])
1.96 - cube([width, depth, top], center = true);
1.97 + translate([-width / 2 + back_left / 2, back_depth / 2, 0])
1.98 + cube([back_left, back_depth, height], center = true);
1.99 + translate([width / 2 - back_right / 2, back_depth / 2, 0])
1.100 + cube([back_right, back_depth, height], center = true);
1.101 + translate([0, back_depth / 2, height / 2 - top / 2])
1.102 + cube([width, back_depth, top], center = true);
1.103 + difference() {
1.104 + translate([0, back_depth / 2,
1.105 + -height / 2 + bottom / 2 + bottom_from_base])
1.106 + cube([width, back_depth, bottom], center = true);
1.107 + translate([0, edge_connector_cutout_back_depth / 2,
1.108 + -height / 2 + bottom / 2 + bottom_from_base])
1.109 + cube([edge_connector_cutout_back_width,
1.110 + edge_connector_cutout_back_depth,
1.111 + bottom + extra], center = true);
1.112 + }
1.113 }
1.114
1.115 /* Label insets. */
1.116 @@ -98,7 +150,7 @@
1.117
1.118 /* Front label. */
1.119
1.120 - translate([-front_label_width / 2, -depth / 2,
1.121 + translate([-front_label_width / 2, -front_depth,
1.122 front_label_offset_from_bottom - height / 2])
1.123 cube([front_label_width, front_label_depth,
1.124 front_label_height]);
1.125 @@ -106,32 +158,37 @@
1.126 /* Top label. */
1.127
1.128 translate([-top_label_width / 2,
1.129 - -depth / 2 + top_label_offset_from_front,
1.130 + -front_depth + top_label_offset_from_front,
1.131 height / 2 - top_label_depth])
1.132 cube([top_label_width, top_label_height,
1.133 top_label_depth]);
1.134 }
1.135
1.136 - /* Top and side grooves. */
1.137 + /* Top and side grooves, positioned in the back portion. */
1.138
1.139 union() {
1.140
1.141 /* Left groove. */
1.142
1.143 - translate([-width / 2 + groove_depth / 2, 0, 0])
1.144 - cube([groove_depth, groove_depth, height],
1.145 + translate([-width / 2 + groove_depth / 2, groove_width / 2, 0])
1.146 + cube([groove_depth, groove_width, height],
1.147 center = true);
1.148
1.149 /* Right groove. */
1.150
1.151 - translate([width / 2 - groove_depth / 2, 0, 0])
1.152 - cube([groove_depth, groove_depth, height],
1.153 + translate([width / 2 - groove_depth / 2, groove_width / 2, 0])
1.154 + cube([groove_depth, groove_width, height],
1.155 center = true);
1.156
1.157 - /* Top groove. */
1.158 + /* Top grooves. */
1.159
1.160 - translate([0, 0, height / 2 - groove_depth / 2])
1.161 - cube([width, groove_depth, groove_depth],
1.162 + translate([0, groove_width / 2, height / 2 - groove_depth / 2])
1.163 + cube([width, groove_width, groove_depth],
1.164 + center = true);
1.165 +
1.166 + translate([0, top_groove_width / 2,
1.167 + height / 2 - top_groove_depth / 2])
1.168 + cube([width, top_groove_width, top_groove_depth],
1.169 center = true);
1.170 }
1.171
1.172 @@ -141,7 +198,7 @@
1.173
1.174 /* From the bottom upwards. */
1.175
1.176 - translate([0, depth / 2, -height / 2])
1.177 + translate([0, back_depth, -height / 2])
1.178 linear_extrude(height = back_cavity_height)
1.179 translate([-width / 2, 0, 0])
1.180 polygon([
1.181 @@ -157,7 +214,7 @@
1.182
1.183 /* From left to right. */
1.184
1.185 - translate([back_cavity_width / 2, depth / 2, -height / 2])
1.186 + translate([back_cavity_width / 2, back_depth, -height / 2])
1.187 rotate([0, -90, 0])
1.188 linear_extrude(height = back_cavity_width)
1.189 polygon([
1.190 @@ -171,7 +228,7 @@
1.191
1.192 /* Inner back cavities. */
1.193
1.194 - translate([0, depth / 2 - inner_back_cavity_offset, -height / 2])
1.195 + translate([0, back_depth - inner_back_cavity_offset, -height / 2])
1.196 linear_extrude(height = bottom_from_base)
1.197 translate([-width / 2, 0, 0])
1.198 polygon([
1.199 @@ -184,7 +241,7 @@
1.200 -inner_back_slope_depth]
1.201 ]);
1.202
1.203 - translate([0, depth / 2 - inner_back_cavity_offset, -height / 2])
1.204 + translate([0, back_depth - inner_back_cavity_offset, -height / 2])
1.205 linear_extrude(height = bottom_from_base)
1.206 translate([-width / 2, 0, 0])
1.207 polygon([
1.208 @@ -200,7 +257,7 @@
1.209 /* Inner back edge cavity. */
1.210
1.211 translate([inner_back_edge_width / 2,
1.212 - depth / 2 - inner_back_edge_offset, -height / 2])
1.213 + back_depth - inner_back_edge_offset, -height / 2])
1.214 rotate([0, -90, 0])
1.215 linear_extrude(height = inner_back_edge_width)
1.216 polygon([
1.217 @@ -213,7 +270,7 @@
1.218 /* Inner front edge cavity. */
1.219
1.220 translate([inner_front_edge_width / 2,
1.221 - -depth / 2 + inner_front_edge_offset, -height / 2])
1.222 + -front_depth + inner_front_edge_offset, -height / 2])
1.223 rotate([0, -90, 0])
1.224 linear_extrude(height = inner_front_edge_width)
1.225 polygon([
1.226 @@ -239,25 +296,25 @@
1.227
1.228 /* Top back and front rounding. */
1.229
1.230 - translate([0, depth / 2 - ro, height / 2 - ro])
1.231 + translate([0, back_depth - ro, height / 2 - ro])
1.232 rotate([0, -90, 0])
1.233 fillet(rr, width);
1.234 - translate([0, -depth / 2 + ro, height / 2 - ro])
1.235 + translate([0, -front_depth + ro, height / 2 - ro])
1.236 rotate([0, 0, 180])
1.237 rotate([0, -90, 0])
1.238 fillet(rr, width);
1.239
1.240 /* Edge rounding. */
1.241
1.242 - translate([width / 2 - ro, depth / 2 - ro, 0])
1.243 + translate([width / 2 - ro, back_depth - ro, 0])
1.244 fillet(rr, height);
1.245 - translate([-width / 2 + ro, depth / 2 - ro, 0])
1.246 + translate([-width / 2 + ro, back_depth - ro, 0])
1.247 rotate([0, 0, 90])
1.248 fillet(rr, height);
1.249 - translate([-width / 2 + ro, -depth / 2 + ro, 0])
1.250 + translate([-width / 2 + ro, -front_depth + ro, 0])
1.251 rotate([0, 0, 180])
1.252 fillet(rr, height);
1.253 - translate([width / 2 - ro, -depth / 2 + ro, 0])
1.254 + translate([width / 2 - ro, -front_depth + ro, 0])
1.255 rotate([0, 0, 270])
1.256 fillet(rr, height);
1.257 }