# HG changeset patch # User Paul Boddie # Date 1412699446 -7200 # Node ID f6f352022ef4a88145c1ce73703fa641166748ac # Parent bd66a16190dbc4c8df96b8849d41f568007af89f Changed the back dimensions to only incorporate a minimum overlap, with extra overlapping material considered separately. Simplified definitions for the back and front inner cutout (accommodating extra overlapping material). diff -r bd66a16190db -r f6f352022ef4 cartridge.scad --- a/cartridge.scad Tue Oct 07 15:20:20 2014 +0200 +++ b/cartridge.scad Tue Oct 07 18:30:46 2014 +0200 @@ -77,33 +77,37 @@ /* Internal dimensions. */ 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; + int_payload_height = 50.8; /* space between the top and the floor */ + int_connector_height = 13.5; /* vertical offset of bottom/floor of payload area */ /* Side thicknesses. */ front = 2; back = 3.5; top = 3; - side = 2; /* increased from 1.5 for 3D printing reliability */ + side = 2; /* increased from 1.5 for 3D printing reliability */ + bottom = 1; /* thickness of floor of payload area */ /* How much extra depth the back provides for mating with the front. */ - groove_width_extra = 2.0; + groove_width_extra = 1.0; + front_back_overlap = 1.0; + groove_width_overlap = front_back_overlap + groove_width_extra; /* Division of pieces into front and back, defining the extents. */ int_front_depth = 4.5; front_depth = int_front_depth + front; - int_back_depth = int_depth - int_front_depth + groove_width_extra; + int_back_depth = int_depth - int_front_depth + front_back_overlap; back_depth = int_back_depth + back; /* Cartridge dimensions. */ width = int_width + side + side; - height = int_payload_height + int_connector_height + top; + height = top + int_payload_height + bottom + int_connector_height; depth = int_depth + front + back; + int_payload_upper_extent = height / 2 - top; /* Cartridge surfaces. */ @@ -113,7 +117,6 @@ back_side = side; back_left = back_side; back_right = back_side; - bottom = 1; /* Label details. */ @@ -134,12 +137,12 @@ */ groove_width_exposed = GROOVE ? 1.5 : 0; - groove_width = groove_width_exposed + groove_width_extra; + groove_width = groove_width_exposed + groove_width_overlap; groove_depth = 1.0; /* how deep the groove goes into each side */ /* Additional cutting to mate the back and front. */ - top_groove_width = groove_width_extra; + top_groove_width = groove_width_overlap; top_groove_depth = 2.0; /* @@ -147,15 +150,13 @@ Offsets are measured from the outside surfaces. */ - inner_top_front_cutout_width = width - back_left - back_right; + inner_top_front_cutout_width = int_width; inner_top_front_cutout_depth = top_groove_width; inner_top_front_cutout_height = top - top_groove_depth; - inner_top_front_cutout_offset = top_groove_depth; - inner_side_front_cutout_height = height - inner_top_front_cutout_offset; + inner_side_front_cutout_height = height - top_groove_depth; inner_side_front_cutout_width = front_side - groove_depth; - inner_side_front_cutout_depth = groove_width_extra; - inner_side_front_cutout_offset = groove_depth; + inner_side_front_cutout_depth = groove_width_overlap; /* The back cavity is the indented part at the bottom of the back of the @@ -201,7 +202,7 @@ */ edge_connector_cutout_front_offset = 1.0; - edge_connector_cutout_front_depth = 1.0; + edge_connector_cutout_front_depth = front_back_overlap; edge_connector_cutout_front_width = 15.0; /* @@ -466,28 +467,23 @@ /* Inner top cutout for the top and sides of the back portion. */ - translate([0, -inner_top_front_cutout_depth / 2, height / 2 - - inner_top_front_cutout_offset - - inner_top_front_cutout_height / 2]) - cube([inner_top_front_cutout_width, - inner_top_front_cutout_depth, - inner_top_front_cutout_height], center = true); + cube_at(inner_top_front_cutout_width, + inner_top_front_cutout_depth, + inner_top_front_cutout_height, + 0, -1, 1, + 0, 0, int_payload_upper_extent); - translate([width / 2 - inner_side_front_cutout_offset - - inner_side_front_cutout_width / 2, - -inner_side_front_cutout_depth / 2, - -inner_top_front_cutout_offset / 2]) - cube([inner_side_front_cutout_width, - inner_side_front_cutout_depth, - inner_side_front_cutout_height], center = true); + cube_at(inner_side_front_cutout_width, + inner_side_front_cutout_depth, + inner_side_front_cutout_height, + 1, -1, 0, + int_width / 2, 0, -inner_top_front_cutout_height); - translate([-width / 2 + inner_side_front_cutout_offset + - inner_side_front_cutout_width / 2, - -inner_side_front_cutout_depth / 2, - -inner_top_front_cutout_offset / 2]) - cube([inner_side_front_cutout_width, - inner_side_front_cutout_depth, - inner_side_front_cutout_height], center = true); + cube_at(inner_side_front_cutout_width, + inner_side_front_cutout_depth, + inner_side_front_cutout_height, + -1, -1, 0, + -int_width / 2, 0, -inner_top_front_cutout_height); /* Fillets to round off the edges. */ @@ -536,14 +532,19 @@ /* Back portion. */ - translate([0, back_depth - back / 2, 0]) - cube([width, back, height], center = true); - translate([-width / 2 + back_left / 2, back_depth / 2, 0]) - cube([back_left, back_depth, height], center = true); - translate([width / 2 - back_right / 2, back_depth / 2, 0]) - cube([back_right, back_depth, height], center = true); - translate([0, back_depth / 2, height / 2 - top / 2]) - cube([width, back_depth, top], center = true); + cube_at(width, back, height, + 0, 1, 0, + 0, int_back_depth, 0); + cube_at(back_left, back_depth + groove_width_extra, height, + -1, 1, 0, + -int_width / 2, -groove_width_extra, 0); + cube_at(back_right, back_depth + groove_width_extra, height, + 1, 1, 0, + int_width / 2, -groove_width_extra, 0); + cube_at(width, back_depth + groove_width_extra, top, + 0, 1, 1, + 0, -groove_width_extra, int_payload_upper_extent); + difference() { /* Floor of cartridge. */ @@ -594,26 +595,25 @@ /* Left groove. */ - translate([-width / 2 + groove_depth / 2, groove_width / 2, 0]) - cube([groove_depth, groove_width, height], - center = true); + cube_at(groove_depth, groove_width, height, + 1, 1, 0, + -width / 2, -groove_width_extra, 0); /* Right groove. */ - translate([width / 2 - groove_depth / 2, groove_width / 2, 0]) - cube([groove_depth, groove_width, height], - center = true); + cube_at(groove_depth, groove_width, height, + -1, 1, 0, + width / 2, -groove_width_extra, 0); /* Top grooves. */ - translate([0, groove_width / 2, height / 2 - groove_depth / 2]) - cube([width, groove_width, groove_depth], - center = true); + cube_at(width, groove_width, groove_depth, + 0, 1, -1, + 0, -groove_width_extra, height / 2); - translate([0, top_groove_width / 2, - height / 2 - top_groove_depth / 2]) - cube([width, top_groove_width, top_groove_depth], - center = true); + cube_at(width, top_groove_width, top_groove_depth, + 0, 1, -1, + 0, -groove_width_extra, height / 2); } /* Back cavity. */