1.1 --- a/cartridge.scad Sat Feb 22 16:06:57 2014 +0100
1.2 +++ b/cartridge.scad Sat Feb 22 20:16:16 2014 +0100
1.3 @@ -178,6 +178,69 @@
1.4 /* Move the PCB support towards the centre. */
1.5 pcb_support_margin = 0.55;
1.6
1.7 + pcb_lug_depth = pcb_back_support_depth +
1.8 + pcb_back_support_bump_depth;
1.9 + pcb_lug_inner_radius = 1.0;
1.10 + pcb_lug_outer_radius = 5.5 / 2;
1.11 + pcb_lug_offset_from_bottom = 14.35;
1.12 + pcb_lug_offset_from_outside = 7.55;
1.13 +
1.14 + pcb_lug_cross_width = 6.7;
1.15 + pcb_lug_cross_depth = pcb_lug_depth;
1.16 + pcb_lug_cross_height = 1.4;
1.17 +
1.18 + /* Repeated constructs. */
1.19 +
1.20 + module pcb_support(xdir) {
1.21 + translate([xdir *
1.22 + (edge_connector_cutout_back_width / 2 - pcb_support_margin),
1.23 + edge_connector_cutout_back_depth,
1.24 + -height / 2 + bottom + bottom_from_base])
1.25 + justify(pcb_back_support_width,
1.26 + pcb_back_support_depth,
1.27 + pcb_back_support_height,
1.28 + xdir, 1, 1)
1.29 + union() {
1.30 + cube([pcb_back_support_width,
1.31 + pcb_back_support_depth,
1.32 + pcb_back_support_height], center = true);
1.33 + cube_at(pcb_back_support_bump_width,
1.34 + pcb_back_support_bump_depth,
1.35 + pcb_back_support_left_bump_height,
1.36 + 0, -1, 1,
1.37 + 0,
1.38 + -pcb_back_support_depth / 2,
1.39 + -pcb_back_support_height / 2 +
1.40 + pcb_back_support_left_bump_offset_from_bottom);
1.41 + }
1.42 + }
1.43 +
1.44 + module pcb_lug(xdir) {
1.45 + translate([xdir *
1.46 + (width/2 - pcb_lug_offset_from_outside),
1.47 + back_depth,
1.48 + -height / 2 + bottom + bottom_from_base +
1.49 + pcb_lug_offset_from_bottom
1.50 + ])
1.51 + rotate([90, 0, 0])
1.52 + difference() {
1.53 + union() {
1.54 + cylinder(h=pcb_lug_depth, r=pcb_lug_outer_radius);
1.55 + cube_at(pcb_lug_cross_width,
1.56 + pcb_lug_cross_height, pcb_lug_cross_depth,
1.57 + 0, 0, 1,
1.58 + 0, 0, 0);
1.59 + cube_at(pcb_lug_cross_height,
1.60 + pcb_lug_cross_width, pcb_lug_cross_depth,
1.61 + 0, 0, 1,
1.62 + 0, 0, 0);
1.63 + }
1.64 + cylinder(h=pcb_lug_depth, r=pcb_lug_inner_radius);
1.65 + }
1.66 + }
1.67 +
1.68 + /* The actual shapes. */
1.69 +
1.70 translate([-width * 0.6, 0, 0])
1.71 difference() {
1.72
1.73 @@ -356,49 +419,13 @@
1.74
1.75 /* PCB supports. */
1.76
1.77 - translate([-edge_connector_cutout_back_width / 2 +
1.78 - pcb_support_margin,
1.79 - edge_connector_cutout_back_depth,
1.80 - -height / 2 + bottom + bottom_from_base])
1.81 - justify(pcb_back_support_width,
1.82 - pcb_back_support_depth,
1.83 - pcb_back_support_height,
1.84 - 1, 1, 1)
1.85 - union() {
1.86 - cube([pcb_back_support_width,
1.87 - pcb_back_support_depth,
1.88 - pcb_back_support_height], center = true);
1.89 - cube_at(pcb_back_support_bump_width,
1.90 - pcb_back_support_bump_depth,
1.91 - pcb_back_support_left_bump_height,
1.92 - 0, -1, 1,
1.93 - 0,
1.94 - -pcb_back_support_depth / 2,
1.95 - -pcb_back_support_height / 2 +
1.96 - pcb_back_support_left_bump_offset_from_bottom);
1.97 - }
1.98 + pcb_support(-1);
1.99 + pcb_support(1);
1.100
1.101 - translate([edge_connector_cutout_back_width / 2 -
1.102 - pcb_support_margin,
1.103 - edge_connector_cutout_back_depth,
1.104 - -height / 2 + bottom + bottom_from_base])
1.105 - justify(pcb_back_support_width,
1.106 - pcb_back_support_depth,
1.107 - pcb_back_support_height,
1.108 - -1, 1, 1)
1.109 - union() {
1.110 - cube([pcb_back_support_width,
1.111 - pcb_back_support_depth,
1.112 - pcb_back_support_height], center = true);
1.113 - cube_at(pcb_back_support_bump_width,
1.114 - pcb_back_support_bump_depth,
1.115 - pcb_back_support_right_bump_height,
1.116 - 0, -1, 1,
1.117 - 0,
1.118 - -pcb_back_support_depth / 2,
1.119 - -pcb_back_support_height / 2 +
1.120 - pcb_back_support_right_bump_offset_from_bottom);
1.121 - }
1.122 + /* Circular "lugs" to hold PCBs in place. */
1.123 +
1.124 + pcb_lug(-1);
1.125 + pcb_lug(1);
1.126 }
1.127
1.128 /* Label insets. */