1.1 --- a/cartridge.scad Tue Jun 10 23:46:59 2014 +0200
1.2 +++ b/cartridge.scad Mon Oct 06 22:08:06 2014 +0200
1.3 @@ -67,16 +67,12 @@
1.4 cube([width, depth, height], center = true);
1.5 }
1.6
1.7 - /* Cartridge dimensions. */
1.8 + /* Internal dimensions. */
1.9
1.10 - width = 90.0;
1.11 - height = 68.3;
1.12 - depth = 16.5;
1.13 - front_depth = 6.5;
1.14 -
1.15 - /* How much extra depth the back provides for mating with the front. */
1.16 - groove_width_extra = 2.0;
1.17 - back_depth = depth - front_depth + groove_width_extra;
1.18 + int_width = 86.0;
1.19 + int_payload_height = 51.8; /* includes bottom of payload area */
1.20 + int_connector_height = 13.5; /* height of bottom/floor of payload area */
1.21 + int_depth = 11.0;
1.22
1.23 /* Side thicknesses. */
1.24
1.25 @@ -85,6 +81,23 @@
1.26 top = 3;
1.27 side = 2; /* increased from 1.5 for 3D printing reliability */
1.28
1.29 + /* How much extra depth the back provides for mating with the front. */
1.30 +
1.31 + groove_width_extra = 2.0;
1.32 +
1.33 + /* Division of pieces into front and back. */
1.34 +
1.35 + front_depth = 6.5;
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 + depth = int_depth + front + back;
1.42 + back_depth = depth - front_depth + groove_width_extra;
1.43 +
1.44 + /* Cartridge surfaces. */
1.45 +
1.46 front_side = side;
1.47 front_left = front_side;
1.48 front_right = front_side;
1.49 @@ -162,10 +175,6 @@
1.50 inner_front_edge_height = 3.0;
1.51 inner_front_edge_depth = 1.5;
1.52
1.53 - /* The height of the floor of the compartment above the very bottom. */
1.54 -
1.55 - bottom_from_base = 13.5;
1.56 -
1.57 edge_connector_cutout_front_offset = 1.0;
1.58 edge_connector_cutout_front_depth = 1.0;
1.59 edge_connector_cutout_front_width = 15.0;
1.60 @@ -183,7 +192,7 @@
1.61 pcb_back_support_width = 1.2;
1.62 pcb_back_support_depth = back_depth -
1.63 edge_connector_cutout_back_depth;
1.64 - pcb_back_support_height = height - bottom_from_base - top - bottom;
1.65 + pcb_back_support_height = height - int_connector_height - top - bottom;
1.66
1.67 pcb_front_support_width = 1.2;
1.68 pcb_front_support_depth = front_depth;
1.69 @@ -240,7 +249,7 @@
1.70 translate([xdir *
1.71 pcb_support_offset_from_centre,
1.72 edge_connector_cutout_back_depth,
1.73 - -height / 2 + bottom + bottom_from_base])
1.74 + -height / 2 + bottom + int_connector_height])
1.75 justify(pcb_back_support_width,
1.76 pcb_back_support_depth,
1.77 pcb_back_support_height,
1.78 @@ -280,7 +289,7 @@
1.79 translate([xdir *
1.80 (width/2 - pcb_lug_offset_from_outside),
1.81 back_depth,
1.82 - -height / 2 + bottom + bottom_from_base +
1.83 + -height / 2 + bottom + int_connector_height +
1.84 pcb_lug_offset_from_bottom
1.85 ])
1.86 rotate([90, 0, 0])
1.87 @@ -304,7 +313,7 @@
1.88 translate([xdir *
1.89 (width/2 - pcb_lug_offset_from_outside),
1.90 -front_depth + front + pcb_front_lug_depth,
1.91 - -height / 2 + bottom + bottom_from_base +
1.92 + -height / 2 + bottom + int_connector_height +
1.93 pcb_lug_offset_from_bottom
1.94 ])
1.95 rotate([90, 0, 0])
1.96 @@ -341,7 +350,7 @@
1.97
1.98 cube_at(width, front_depth, bottom,
1.99 0, -1, 1,
1.100 - 0, 0, -height / 2 + bottom_from_base);
1.101 + 0, 0, -height / 2 + int_connector_height);
1.102
1.103 /* Left cutout. */
1.104
1.105 @@ -351,7 +360,7 @@
1.106 1, -1, 1,
1.107 -width / 2 + edge_connector_cutout_front_offset,
1.108 0,
1.109 - -height / 2 + bottom_from_base);
1.110 + -height / 2 + int_connector_height);
1.111
1.112 /* Right cutout. */
1.113
1.114 @@ -361,7 +370,7 @@
1.115 -1, -1, 1,
1.116 width / 2 - edge_connector_cutout_front_offset,
1.117 0,
1.118 - -height / 2 + bottom_from_base);
1.119 + -height / 2 + int_connector_height);
1.120 }
1.121
1.122 /* PCB supports. */
1.123 @@ -373,7 +382,7 @@
1.124 -edge_connector_cutout_back_width / 2 +
1.125 pcb_support_margin,
1.126 0,
1.127 - -height / 2 + bottom + bottom_from_base);
1.128 + -height / 2 + bottom + int_connector_height);
1.129
1.130 cube_at(pcb_front_support_width,
1.131 pcb_front_support_depth,
1.132 @@ -382,7 +391,7 @@
1.133 edge_connector_cutout_back_width / 2 -
1.134 pcb_support_margin,
1.135 0,
1.136 - -height / 2 + bottom + bottom_from_base);
1.137 + -height / 2 + bottom + int_connector_height);
1.138
1.139 /* Circular "lugs" to hold PCBs in place. */
1.140
1.141 @@ -504,7 +513,7 @@
1.142
1.143 cube_at(width, back_depth, bottom,
1.144 0, 1, 1,
1.145 - 0, 0, -height / 2 + bottom_from_base);
1.146 + 0, 0, -height / 2 + int_connector_height);
1.147
1.148 /* Edge connector cutout. */
1.149
1.150 @@ -512,7 +521,7 @@
1.151 edge_connector_cutout_back_depth,
1.152 bottom,
1.153 0, 1, 1,
1.154 - 0, 0, -height / 2 + bottom_from_base);
1.155 + 0, 0, -height / 2 + int_connector_height);
1.156 }
1.157
1.158 /* PCB supports. */
1.159 @@ -606,7 +615,7 @@
1.160 /* Inner back cavities. */
1.161
1.162 translate([0, back_depth - inner_back_cavity_offset, -height / 2])
1.163 - linear_extrude(height = bottom_from_base)
1.164 + linear_extrude(height = int_connector_height)
1.165 translate([-width / 2, 0, 0])
1.166 polygon([
1.167 [inner_back_cavity_offset_from_left, 0],
1.168 @@ -619,7 +628,7 @@
1.169 ]);
1.170
1.171 translate([0, back_depth - inner_back_cavity_offset, -height / 2])
1.172 - linear_extrude(height = bottom_from_base)
1.173 + linear_extrude(height = int_connector_height)
1.174 translate([-width / 2, 0, 0])
1.175 polygon([
1.176 [width - inner_back_slope_offset_from_left, 0],
1.177 @@ -675,4 +684,4 @@
1.178 }
1.179 }
1.180
1.181 -cartridge();
1.182 \ No newline at end of file
1.183 +cartridge();