# HG changeset patch # User Paul Boddie # Date 1412626086 -7200 # Node ID 206e88f570e24389759a87832d77bbed515972e8 # Parent 315780887582c4347002cabd54cbbaef8fbac3d2 Changed the measurements to be based on an internal volume. diff -r 315780887582 -r 206e88f570e2 cartridge.scad --- a/cartridge.scad Tue Jun 10 23:46:59 2014 +0200 +++ b/cartridge.scad Mon Oct 06 22:08:06 2014 +0200 @@ -67,16 +67,12 @@ cube([width, depth, height], center = true); } - /* Cartridge dimensions. */ + /* Internal dimensions. */ - width = 90.0; - height = 68.3; - depth = 16.5; - front_depth = 6.5; - - /* How much extra depth the back provides for mating with the front. */ - groove_width_extra = 2.0; - back_depth = depth - front_depth + groove_width_extra; + int_width = 86.0; + int_payload_height = 51.8; /* includes bottom of payload area */ + int_connector_height = 13.5; /* height of bottom/floor of payload area */ + int_depth = 11.0; /* Side thicknesses. */ @@ -85,6 +81,23 @@ top = 3; side = 2; /* increased from 1.5 for 3D printing reliability */ + /* How much extra depth the back provides for mating with the front. */ + + groove_width_extra = 2.0; + + /* Division of pieces into front and back. */ + + front_depth = 6.5; + + /* Cartridge dimensions. */ + + width = int_width + side + side; + height = int_payload_height + int_connector_height + top; + depth = int_depth + front + back; + back_depth = depth - front_depth + groove_width_extra; + + /* Cartridge surfaces. */ + front_side = side; front_left = front_side; front_right = front_side; @@ -162,10 +175,6 @@ inner_front_edge_height = 3.0; inner_front_edge_depth = 1.5; - /* The height of the floor of the compartment above the very bottom. */ - - bottom_from_base = 13.5; - edge_connector_cutout_front_offset = 1.0; edge_connector_cutout_front_depth = 1.0; edge_connector_cutout_front_width = 15.0; @@ -183,7 +192,7 @@ pcb_back_support_width = 1.2; pcb_back_support_depth = back_depth - edge_connector_cutout_back_depth; - pcb_back_support_height = height - bottom_from_base - top - bottom; + pcb_back_support_height = height - int_connector_height - top - bottom; pcb_front_support_width = 1.2; pcb_front_support_depth = front_depth; @@ -240,7 +249,7 @@ translate([xdir * pcb_support_offset_from_centre, edge_connector_cutout_back_depth, - -height / 2 + bottom + bottom_from_base]) + -height / 2 + bottom + int_connector_height]) justify(pcb_back_support_width, pcb_back_support_depth, pcb_back_support_height, @@ -280,7 +289,7 @@ translate([xdir * (width/2 - pcb_lug_offset_from_outside), back_depth, - -height / 2 + bottom + bottom_from_base + + -height / 2 + bottom + int_connector_height + pcb_lug_offset_from_bottom ]) rotate([90, 0, 0]) @@ -304,7 +313,7 @@ translate([xdir * (width/2 - pcb_lug_offset_from_outside), -front_depth + front + pcb_front_lug_depth, - -height / 2 + bottom + bottom_from_base + + -height / 2 + bottom + int_connector_height + pcb_lug_offset_from_bottom ]) rotate([90, 0, 0]) @@ -341,7 +350,7 @@ cube_at(width, front_depth, bottom, 0, -1, 1, - 0, 0, -height / 2 + bottom_from_base); + 0, 0, -height / 2 + int_connector_height); /* Left cutout. */ @@ -351,7 +360,7 @@ 1, -1, 1, -width / 2 + edge_connector_cutout_front_offset, 0, - -height / 2 + bottom_from_base); + -height / 2 + int_connector_height); /* Right cutout. */ @@ -361,7 +370,7 @@ -1, -1, 1, width / 2 - edge_connector_cutout_front_offset, 0, - -height / 2 + bottom_from_base); + -height / 2 + int_connector_height); } /* PCB supports. */ @@ -373,7 +382,7 @@ -edge_connector_cutout_back_width / 2 + pcb_support_margin, 0, - -height / 2 + bottom + bottom_from_base); + -height / 2 + bottom + int_connector_height); cube_at(pcb_front_support_width, pcb_front_support_depth, @@ -382,7 +391,7 @@ edge_connector_cutout_back_width / 2 - pcb_support_margin, 0, - -height / 2 + bottom + bottom_from_base); + -height / 2 + bottom + int_connector_height); /* Circular "lugs" to hold PCBs in place. */ @@ -504,7 +513,7 @@ cube_at(width, back_depth, bottom, 0, 1, 1, - 0, 0, -height / 2 + bottom_from_base); + 0, 0, -height / 2 + int_connector_height); /* Edge connector cutout. */ @@ -512,7 +521,7 @@ edge_connector_cutout_back_depth, bottom, 0, 1, 1, - 0, 0, -height / 2 + bottom_from_base); + 0, 0, -height / 2 + int_connector_height); } /* PCB supports. */ @@ -606,7 +615,7 @@ /* Inner back cavities. */ translate([0, back_depth - inner_back_cavity_offset, -height / 2]) - linear_extrude(height = bottom_from_base) + linear_extrude(height = int_connector_height) translate([-width / 2, 0, 0]) polygon([ [inner_back_cavity_offset_from_left, 0], @@ -619,7 +628,7 @@ ]); translate([0, back_depth - inner_back_cavity_offset, -height / 2]) - linear_extrude(height = bottom_from_base) + linear_extrude(height = int_connector_height) translate([-width / 2, 0, 0]) polygon([ [width - inner_back_slope_offset_from_left, 0], @@ -675,4 +684,4 @@ } } -cartridge(); \ No newline at end of file +cartridge();