# HG changeset patch # User Paul Boddie # Date 1390089080 -3600 # Node ID 6a558059d57646b03dd2ac81d396d320cbb47961 # Parent 6a9c1d13b576d01c63950b9ceaf1388954838cec Separated the front and back of the cartridge, adding the cutouts for the edge connector and an extra groove at the top where the parts fit together. diff -r 6a9c1d13b576 -r 6a558059d576 cartridge.scad --- a/cartridge.scad Sun Jan 19 00:04:19 2014 +0100 +++ b/cartridge.scad Sun Jan 19 00:51:20 2014 +0100 @@ -23,6 +23,8 @@ width = 89.0; height = 68.5; depth = 16.5; + front_depth = 6.5; + back_depth = 11.0; /* Details. */ @@ -36,7 +38,10 @@ top_label_depth = front_label_depth; top_label_offset_from_front = 2.5; - groove_depth = 1.0; + groove_width = 2.5; /* how much the groove cuts out of the back */ + groove_depth = 1.0; /* how deep the groove goes into each side */ + top_groove_width = 1.0; + top_groove_depth = 2.0; back_cavity_width = 68.0; back_cavity_inner_width = 65.0; @@ -64,13 +69,21 @@ 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; + edge_connector_cutout_back_depth = 3.0; + edge_connector_cutout_back_width = 57.0; + /* Side thicknesses. */ front = 2; back = 3.5; top = 3; - left = 2; - right = 2; + front_left = 1; + front_right = 1; + back_left = 2; + back_right = 2; bottom = 2; difference() { @@ -78,18 +91,57 @@ /* The cartridge surfaces. */ union() { - translate([0, -depth / 2 + front / 2, 0]) + + /* Front portion. */ + + translate([0, -front_depth + front / 2, 0]) cube([width, front, height], center = true); - translate([0, depth / 2 - back / 2, 0]) + translate([-width / 2 + front_left / 2, -front_depth / 2, 0]) + cube([front_left, front_depth, height], center = true); + translate([width / 2 - front_right / 2, -front_depth / 2, 0]) + cube([front_right, front_depth, height], center = true); + translate([0, -front_depth / 2, height / 2 - top / 2]) + cube([width, front_depth, top], center = true); + difference() { + translate([0, -front_depth / 2, + -height / 2 + bottom / 2 + bottom_from_base]) + cube([width, front_depth, bottom], center = true); + translate([-width / 2 + edge_connector_cutout_front_offset + + edge_connector_cutout_front_width / 2, + -edge_connector_cutout_front_depth / 2, + -height / 2 + bottom / 2 + bottom_from_base]) + cube([edge_connector_cutout_front_width, + edge_connector_cutout_front_depth, + bottom + extra], center = true); + translate([width / 2 - edge_connector_cutout_front_offset - + edge_connector_cutout_front_width / 2, + -edge_connector_cutout_front_depth / 2, + -height / 2 + bottom / 2 + bottom_from_base]) + cube([edge_connector_cutout_front_width, + edge_connector_cutout_front_depth, + bottom + extra], center = true); + } + + /* Back portion. */ + + translate([0, back_depth - back / 2, 0]) cube([width, back, height], center = true); - translate([-width / 2 + left / 2, 0, 0]) - cube([left, depth, height], center = true); - translate([width / 2 - right / 2, 0, 0]) - cube([right, depth, height], center = true); - translate([0, 0, height / 2 - top / 2]) - cube([width, depth, top], center = true); - translate([0, 0, -height / 2 + bottom / 2 + bottom_from_base]) - cube([width, depth, top], 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); + difference() { + translate([0, back_depth / 2, + -height / 2 + bottom / 2 + bottom_from_base]) + cube([width, back_depth, bottom], center = true); + translate([0, edge_connector_cutout_back_depth / 2, + -height / 2 + bottom / 2 + bottom_from_base]) + cube([edge_connector_cutout_back_width, + edge_connector_cutout_back_depth, + bottom + extra], center = true); + } } /* Label insets. */ @@ -98,7 +150,7 @@ /* Front label. */ - translate([-front_label_width / 2, -depth / 2, + translate([-front_label_width / 2, -front_depth, front_label_offset_from_bottom - height / 2]) cube([front_label_width, front_label_depth, front_label_height]); @@ -106,32 +158,37 @@ /* Top label. */ translate([-top_label_width / 2, - -depth / 2 + top_label_offset_from_front, + -front_depth + top_label_offset_from_front, height / 2 - top_label_depth]) cube([top_label_width, top_label_height, top_label_depth]); } - /* Top and side grooves. */ + /* Top and side grooves, positioned in the back portion. */ union() { /* Left groove. */ - translate([-width / 2 + groove_depth / 2, 0, 0]) - cube([groove_depth, groove_depth, height], + translate([-width / 2 + groove_depth / 2, groove_width / 2, 0]) + cube([groove_depth, groove_width, height], center = true); /* Right groove. */ - translate([width / 2 - groove_depth / 2, 0, 0]) - cube([groove_depth, groove_depth, height], + translate([width / 2 - groove_depth / 2, groove_width / 2, 0]) + cube([groove_depth, groove_width, height], center = true); - /* Top groove. */ + /* Top grooves. */ - translate([0, 0, height / 2 - groove_depth / 2]) - cube([width, groove_depth, groove_depth], + translate([0, groove_width / 2, height / 2 - groove_depth / 2]) + cube([width, groove_width, groove_depth], + center = true); + + translate([0, top_groove_width / 2, + height / 2 - top_groove_depth / 2]) + cube([width, top_groove_width, top_groove_depth], center = true); } @@ -141,7 +198,7 @@ /* From the bottom upwards. */ - translate([0, depth / 2, -height / 2]) + translate([0, back_depth, -height / 2]) linear_extrude(height = back_cavity_height) translate([-width / 2, 0, 0]) polygon([ @@ -157,7 +214,7 @@ /* From left to right. */ - translate([back_cavity_width / 2, depth / 2, -height / 2]) + translate([back_cavity_width / 2, back_depth, -height / 2]) rotate([0, -90, 0]) linear_extrude(height = back_cavity_width) polygon([ @@ -171,7 +228,7 @@ /* Inner back cavities. */ - translate([0, depth / 2 - inner_back_cavity_offset, -height / 2]) + translate([0, back_depth - inner_back_cavity_offset, -height / 2]) linear_extrude(height = bottom_from_base) translate([-width / 2, 0, 0]) polygon([ @@ -184,7 +241,7 @@ -inner_back_slope_depth] ]); - translate([0, depth / 2 - inner_back_cavity_offset, -height / 2]) + translate([0, back_depth - inner_back_cavity_offset, -height / 2]) linear_extrude(height = bottom_from_base) translate([-width / 2, 0, 0]) polygon([ @@ -200,7 +257,7 @@ /* Inner back edge cavity. */ translate([inner_back_edge_width / 2, - depth / 2 - inner_back_edge_offset, -height / 2]) + back_depth - inner_back_edge_offset, -height / 2]) rotate([0, -90, 0]) linear_extrude(height = inner_back_edge_width) polygon([ @@ -213,7 +270,7 @@ /* Inner front edge cavity. */ translate([inner_front_edge_width / 2, - -depth / 2 + inner_front_edge_offset, -height / 2]) + -front_depth + inner_front_edge_offset, -height / 2]) rotate([0, -90, 0]) linear_extrude(height = inner_front_edge_width) polygon([ @@ -239,25 +296,25 @@ /* Top back and front rounding. */ - translate([0, depth / 2 - ro, height / 2 - ro]) + translate([0, back_depth - ro, height / 2 - ro]) rotate([0, -90, 0]) fillet(rr, width); - translate([0, -depth / 2 + ro, height / 2 - ro]) + translate([0, -front_depth + ro, height / 2 - ro]) rotate([0, 0, 180]) rotate([0, -90, 0]) fillet(rr, width); /* Edge rounding. */ - translate([width / 2 - ro, depth / 2 - ro, 0]) + translate([width / 2 - ro, back_depth - ro, 0]) fillet(rr, height); - translate([-width / 2 + ro, depth / 2 - ro, 0]) + translate([-width / 2 + ro, back_depth - ro, 0]) rotate([0, 0, 90]) fillet(rr, height); - translate([-width / 2 + ro, -depth / 2 + ro, 0]) + translate([-width / 2 + ro, -front_depth + ro, 0]) rotate([0, 0, 180]) fillet(rr, height); - translate([width / 2 - ro, -depth / 2 + ro, 0]) + translate([width / 2 - ro, -front_depth + ro, 0]) rotate([0, 0, 270]) fillet(rr, height); }