# HG changeset patch # User Paul Boddie # Date 1390090730 -3600 # Node ID a6ec4bdde10ab7c793ff6c8df4eb6fdbdc25a679 # Parent 4910bce5fa5062f44acdac0621d8993398a675a4 Separated the front and back parts of the cartridge for individual manipulation. diff -r 4910bce5fa50 -r a6ec4bdde10a cartridge.scad --- a/cartridge.scad Sun Jan 19 01:12:57 2014 +0100 +++ b/cartridge.scad Sun Jan 19 01:18:50 2014 +0100 @@ -124,6 +124,78 @@ edge_connector_cutout_front_depth, bottom + extra], center = true); } + } + + /* Label insets. */ + + union() { + + /* Front label. */ + + translate([-front_label_width / 2, -front_depth, + front_label_offset_from_bottom - height / 2]) + cube([front_label_width, front_label_depth, + front_label_height]); + + /* Top label. */ + + translate([-top_label_width / 2, + -front_depth + top_label_offset_from_front, + height / 2 - top_label_depth]) + cube([top_label_width, top_label_height, + top_label_depth]); + } + + /* Inner front edge cavity. */ + + translate([inner_front_edge_width / 2, + -front_depth + inner_front_edge_offset, -height / 2]) + rotate([0, -90, 0]) + linear_extrude(height = inner_front_edge_width) + polygon([ + [-extra, 0], + [0, 0], + [inner_front_edge_height, inner_front_edge_depth], + [-extra, inner_front_edge_depth], + ]); + + /* Fillets to round off the edges. */ + + union() { + + /* Top left and right rounding. */ + + translate([-width / 2 + ro, -front_depth / 2, height / 2 - ro]) + rotate([0, 0, 180]) + rotate([90, 0, 0]) + fillet(rr, front_depth); + translate([width / 2 - ro, -front_depth / 2, height / 2 - ro]) + rotate([90, 0, 0]) + fillet(rr, front_depth); + + /* Top front rounding. */ + + 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, -front_depth + ro, 0]) + rotate([0, 0, 180]) + fillet(rr, height); + translate([width / 2 - ro, -front_depth + ro, 0]) + rotate([0, 0, 270]) + fillet(rr, height); + } + } + + difference() { + + /* The cartridge surfaces. */ + + union() { /* Back portion. */ @@ -151,13 +223,6 @@ union() { - /* Front label. */ - - translate([-front_label_width / 2, -front_depth, - front_label_offset_from_bottom - height / 2]) - cube([front_label_width, front_label_depth, - front_label_height]); - /* Top label. */ translate([-top_label_width / 2, @@ -279,33 +344,12 @@ [-extra, 0] ]); - /* Inner front edge cavity. */ - - translate([inner_front_edge_width / 2, - -front_depth + inner_front_edge_offset, -height / 2]) - rotate([0, -90, 0]) - linear_extrude(height = inner_front_edge_width) - polygon([ - [-extra, 0], - [0, 0], - [inner_front_edge_height, inner_front_edge_depth], - [-extra, inner_front_edge_depth], - ]); - /* Fillets to round off the edges. */ union() { /* Top left and right rounding. */ - translate([-width / 2 + ro, -front_depth / 2, height / 2 - ro]) - rotate([0, 0, 180]) - rotate([90, 0, 0]) - fillet(rr, front_depth); - translate([width / 2 - ro, -front_depth / 2, height / 2 - ro]) - rotate([90, 0, 0]) - fillet(rr, front_depth); - translate([-width / 2 + ro, back_depth / 2, height / 2 - ro]) rotate([0, 0, 180]) rotate([90, 0, 0]) @@ -314,15 +358,11 @@ rotate([90, 0, 0]) fillet(rr, back_depth); - /* Top back and front rounding. */ + /* Top back rounding. */ translate([0, back_depth - ro, height / 2 - ro]) rotate([0, -90, 0]) fillet(rr, width); - translate([0, -front_depth + ro, height / 2 - ro]) - rotate([0, 0, 180]) - rotate([0, -90, 0]) - fillet(rr, width); /* Edge rounding. */ @@ -331,12 +371,6 @@ translate([-width / 2 + ro, back_depth - ro, 0]) rotate([0, 0, 90]) fillet(rr, height); - translate([-width / 2 + ro, -front_depth + ro, 0]) - rotate([0, 0, 180]) - fillet(rr, height); - translate([width / 2 - ro, -front_depth + ro, 0]) - rotate([0, 0, 270]) - fillet(rr, height); } } }