1.1 --- a/cartridge.scad Tue Oct 07 15:20:20 2014 +0200
1.2 +++ b/cartridge.scad Tue Oct 07 18:30:46 2014 +0200
1.3 @@ -77,33 +77,37 @@
1.4 /* Internal dimensions. */
1.5
1.6 int_width = 86.0;
1.7 - int_payload_height = 51.8; /* includes bottom of payload area */
1.8 - int_connector_height = 13.5; /* height of bottom/floor of payload area */
1.9 int_depth = 11.0;
1.10 + int_payload_height = 50.8; /* space between the top and the floor */
1.11 + int_connector_height = 13.5; /* vertical offset of bottom/floor of payload area */
1.12
1.13 /* Side thicknesses. */
1.14
1.15 front = 2;
1.16 back = 3.5;
1.17 top = 3;
1.18 - side = 2; /* increased from 1.5 for 3D printing reliability */
1.19 + side = 2; /* increased from 1.5 for 3D printing reliability */
1.20 + bottom = 1; /* thickness of floor of payload area */
1.21
1.22 /* How much extra depth the back provides for mating with the front. */
1.23
1.24 - groove_width_extra = 2.0;
1.25 + groove_width_extra = 1.0;
1.26 + front_back_overlap = 1.0;
1.27 + groove_width_overlap = front_back_overlap + groove_width_extra;
1.28
1.29 /* Division of pieces into front and back, defining the extents. */
1.30
1.31 int_front_depth = 4.5;
1.32 front_depth = int_front_depth + front;
1.33 - int_back_depth = int_depth - int_front_depth + groove_width_extra;
1.34 + int_back_depth = int_depth - int_front_depth + front_back_overlap;
1.35 back_depth = int_back_depth + back;
1.36
1.37 /* Cartridge dimensions. */
1.38
1.39 width = int_width + side + side;
1.40 - height = int_payload_height + int_connector_height + top;
1.41 + height = top + int_payload_height + bottom + int_connector_height;
1.42 depth = int_depth + front + back;
1.43 + int_payload_upper_extent = height / 2 - top;
1.44
1.45 /* Cartridge surfaces. */
1.46
1.47 @@ -113,7 +117,6 @@
1.48 back_side = side;
1.49 back_left = back_side;
1.50 back_right = back_side;
1.51 - bottom = 1;
1.52
1.53 /* Label details. */
1.54
1.55 @@ -134,12 +137,12 @@
1.56 */
1.57
1.58 groove_width_exposed = GROOVE ? 1.5 : 0;
1.59 - groove_width = groove_width_exposed + groove_width_extra;
1.60 + groove_width = groove_width_exposed + groove_width_overlap;
1.61 groove_depth = 1.0; /* how deep the groove goes into each side */
1.62
1.63 /* Additional cutting to mate the back and front. */
1.64
1.65 - top_groove_width = groove_width_extra;
1.66 + top_groove_width = groove_width_overlap;
1.67 top_groove_depth = 2.0;
1.68
1.69 /*
1.70 @@ -147,15 +150,13 @@
1.71 Offsets are measured from the outside surfaces.
1.72 */
1.73
1.74 - inner_top_front_cutout_width = width - back_left - back_right;
1.75 + inner_top_front_cutout_width = int_width;
1.76 inner_top_front_cutout_depth = top_groove_width;
1.77 inner_top_front_cutout_height = top - top_groove_depth;
1.78 - inner_top_front_cutout_offset = top_groove_depth;
1.79
1.80 - inner_side_front_cutout_height = height - inner_top_front_cutout_offset;
1.81 + inner_side_front_cutout_height = height - top_groove_depth;
1.82 inner_side_front_cutout_width = front_side - groove_depth;
1.83 - inner_side_front_cutout_depth = groove_width_extra;
1.84 - inner_side_front_cutout_offset = groove_depth;
1.85 + inner_side_front_cutout_depth = groove_width_overlap;
1.86
1.87 /*
1.88 The back cavity is the indented part at the bottom of the back of the
1.89 @@ -201,7 +202,7 @@
1.90 */
1.91
1.92 edge_connector_cutout_front_offset = 1.0;
1.93 - edge_connector_cutout_front_depth = 1.0;
1.94 + edge_connector_cutout_front_depth = front_back_overlap;
1.95 edge_connector_cutout_front_width = 15.0;
1.96
1.97 /*
1.98 @@ -466,28 +467,23 @@
1.99
1.100 /* Inner top cutout for the top and sides of the back portion. */
1.101
1.102 - translate([0, -inner_top_front_cutout_depth / 2, height / 2 -
1.103 - inner_top_front_cutout_offset -
1.104 - inner_top_front_cutout_height / 2])
1.105 - cube([inner_top_front_cutout_width,
1.106 - inner_top_front_cutout_depth,
1.107 - inner_top_front_cutout_height], center = true);
1.108 + cube_at(inner_top_front_cutout_width,
1.109 + inner_top_front_cutout_depth,
1.110 + inner_top_front_cutout_height,
1.111 + 0, -1, 1,
1.112 + 0, 0, int_payload_upper_extent);
1.113
1.114 - translate([width / 2 - inner_side_front_cutout_offset -
1.115 - inner_side_front_cutout_width / 2,
1.116 - -inner_side_front_cutout_depth / 2,
1.117 - -inner_top_front_cutout_offset / 2])
1.118 - cube([inner_side_front_cutout_width,
1.119 - inner_side_front_cutout_depth,
1.120 - inner_side_front_cutout_height], center = true);
1.121 + cube_at(inner_side_front_cutout_width,
1.122 + inner_side_front_cutout_depth,
1.123 + inner_side_front_cutout_height,
1.124 + 1, -1, 0,
1.125 + int_width / 2, 0, -inner_top_front_cutout_height);
1.126
1.127 - translate([-width / 2 + inner_side_front_cutout_offset +
1.128 - inner_side_front_cutout_width / 2,
1.129 - -inner_side_front_cutout_depth / 2,
1.130 - -inner_top_front_cutout_offset / 2])
1.131 - cube([inner_side_front_cutout_width,
1.132 - inner_side_front_cutout_depth,
1.133 - inner_side_front_cutout_height], center = true);
1.134 + cube_at(inner_side_front_cutout_width,
1.135 + inner_side_front_cutout_depth,
1.136 + inner_side_front_cutout_height,
1.137 + -1, -1, 0,
1.138 + -int_width / 2, 0, -inner_top_front_cutout_height);
1.139
1.140 /* Fillets to round off the edges. */
1.141
1.142 @@ -536,14 +532,19 @@
1.143
1.144 /* Back portion. */
1.145
1.146 - translate([0, back_depth - back / 2, 0])
1.147 - cube([width, back, height], center = true);
1.148 - translate([-width / 2 + back_left / 2, back_depth / 2, 0])
1.149 - cube([back_left, back_depth, height], center = true);
1.150 - translate([width / 2 - back_right / 2, back_depth / 2, 0])
1.151 - cube([back_right, back_depth, height], center = true);
1.152 - translate([0, back_depth / 2, height / 2 - top / 2])
1.153 - cube([width, back_depth, top], center = true);
1.154 + cube_at(width, back, height,
1.155 + 0, 1, 0,
1.156 + 0, int_back_depth, 0);
1.157 + cube_at(back_left, back_depth + groove_width_extra, height,
1.158 + -1, 1, 0,
1.159 + -int_width / 2, -groove_width_extra, 0);
1.160 + cube_at(back_right, back_depth + groove_width_extra, height,
1.161 + 1, 1, 0,
1.162 + int_width / 2, -groove_width_extra, 0);
1.163 + cube_at(width, back_depth + groove_width_extra, top,
1.164 + 0, 1, 1,
1.165 + 0, -groove_width_extra, int_payload_upper_extent);
1.166 +
1.167 difference() {
1.168
1.169 /* Floor of cartridge. */
1.170 @@ -594,26 +595,25 @@
1.171
1.172 /* Left groove. */
1.173
1.174 - translate([-width / 2 + groove_depth / 2, groove_width / 2, 0])
1.175 - cube([groove_depth, groove_width, height],
1.176 - center = true);
1.177 + cube_at(groove_depth, groove_width, height,
1.178 + 1, 1, 0,
1.179 + -width / 2, -groove_width_extra, 0);
1.180
1.181 /* Right groove. */
1.182
1.183 - translate([width / 2 - groove_depth / 2, groove_width / 2, 0])
1.184 - cube([groove_depth, groove_width, height],
1.185 - center = true);
1.186 + cube_at(groove_depth, groove_width, height,
1.187 + -1, 1, 0,
1.188 + width / 2, -groove_width_extra, 0);
1.189
1.190 /* Top grooves. */
1.191
1.192 - translate([0, groove_width / 2, height / 2 - groove_depth / 2])
1.193 - cube([width, groove_width, groove_depth],
1.194 - center = true);
1.195 + cube_at(width, groove_width, groove_depth,
1.196 + 0, 1, -1,
1.197 + 0, -groove_width_extra, height / 2);
1.198
1.199 - translate([0, top_groove_width / 2,
1.200 - height / 2 - top_groove_depth / 2])
1.201 - cube([width, top_groove_width, top_groove_depth],
1.202 - center = true);
1.203 + cube_at(width, top_groove_width, top_groove_depth,
1.204 + 0, 1, -1,
1.205 + 0, -groove_width_extra, height / 2);
1.206 }
1.207
1.208 /* Back cavity. */