# HG changeset patch # User Paul Boddie # Date 1393096576 -3600 # Node ID e3b0d233b80d10e235b7395a711bff9f5b5a8318 # Parent 785e92ee4c9629cf277f843559fe46b7fcbe929f Added PCB "lug" definitions and made module definitions for supports and lugs. diff -r 785e92ee4c96 -r e3b0d233b80d cartridge.scad --- a/cartridge.scad Sat Feb 22 16:06:57 2014 +0100 +++ b/cartridge.scad Sat Feb 22 20:16:16 2014 +0100 @@ -178,6 +178,69 @@ /* Move the PCB support towards the centre. */ pcb_support_margin = 0.55; + pcb_lug_depth = pcb_back_support_depth + + pcb_back_support_bump_depth; + pcb_lug_inner_radius = 1.0; + pcb_lug_outer_radius = 5.5 / 2; + pcb_lug_offset_from_bottom = 14.35; + pcb_lug_offset_from_outside = 7.55; + + pcb_lug_cross_width = 6.7; + pcb_lug_cross_depth = pcb_lug_depth; + pcb_lug_cross_height = 1.4; + + /* Repeated constructs. */ + + module pcb_support(xdir) { + translate([xdir * + (edge_connector_cutout_back_width / 2 - pcb_support_margin), + edge_connector_cutout_back_depth, + -height / 2 + bottom + bottom_from_base]) + justify(pcb_back_support_width, + pcb_back_support_depth, + pcb_back_support_height, + xdir, 1, 1) + union() { + cube([pcb_back_support_width, + pcb_back_support_depth, + pcb_back_support_height], center = true); + cube_at(pcb_back_support_bump_width, + pcb_back_support_bump_depth, + pcb_back_support_left_bump_height, + 0, -1, 1, + 0, + -pcb_back_support_depth / 2, + -pcb_back_support_height / 2 + + pcb_back_support_left_bump_offset_from_bottom); + } + } + + module pcb_lug(xdir) { + translate([xdir * + (width/2 - pcb_lug_offset_from_outside), + back_depth, + -height / 2 + bottom + bottom_from_base + + pcb_lug_offset_from_bottom + ]) + rotate([90, 0, 0]) + difference() { + union() { + cylinder(h=pcb_lug_depth, r=pcb_lug_outer_radius); + cube_at(pcb_lug_cross_width, + pcb_lug_cross_height, pcb_lug_cross_depth, + 0, 0, 1, + 0, 0, 0); + cube_at(pcb_lug_cross_height, + pcb_lug_cross_width, pcb_lug_cross_depth, + 0, 0, 1, + 0, 0, 0); + } + cylinder(h=pcb_lug_depth, r=pcb_lug_inner_radius); + } + } + + /* The actual shapes. */ + translate([-width * 0.6, 0, 0]) difference() { @@ -356,49 +419,13 @@ /* PCB supports. */ - translate([-edge_connector_cutout_back_width / 2 + - pcb_support_margin, - edge_connector_cutout_back_depth, - -height / 2 + bottom + bottom_from_base]) - justify(pcb_back_support_width, - pcb_back_support_depth, - pcb_back_support_height, - 1, 1, 1) - union() { - cube([pcb_back_support_width, - pcb_back_support_depth, - pcb_back_support_height], center = true); - cube_at(pcb_back_support_bump_width, - pcb_back_support_bump_depth, - pcb_back_support_left_bump_height, - 0, -1, 1, - 0, - -pcb_back_support_depth / 2, - -pcb_back_support_height / 2 + - pcb_back_support_left_bump_offset_from_bottom); - } + pcb_support(-1); + pcb_support(1); - translate([edge_connector_cutout_back_width / 2 - - pcb_support_margin, - edge_connector_cutout_back_depth, - -height / 2 + bottom + bottom_from_base]) - justify(pcb_back_support_width, - pcb_back_support_depth, - pcb_back_support_height, - -1, 1, 1) - union() { - cube([pcb_back_support_width, - pcb_back_support_depth, - pcb_back_support_height], center = true); - cube_at(pcb_back_support_bump_width, - pcb_back_support_bump_depth, - pcb_back_support_right_bump_height, - 0, -1, 1, - 0, - -pcb_back_support_depth / 2, - -pcb_back_support_height / 2 + - pcb_back_support_right_bump_offset_from_bottom); - } + /* Circular "lugs" to hold PCBs in place. */ + + pcb_lug(-1); + pcb_lug(1); } /* Label insets. */