1.1 --- a/cartridge.scad Tue Oct 07 22:32:35 2014 +0200
1.2 +++ b/cartridge.scad Wed Oct 08 00:43:47 2014 +0200
1.3 @@ -50,6 +50,9 @@
1.4 ro = rr;
1.5 extra = 0.1;
1.6
1.7 + groove_rr = 0.5;
1.8 + groove_ro = groove_rr;
1.9 +
1.10 module fillet(r, h) {
1.11 translate([0, 0, -h/2])
1.12 difference() {
1.13 @@ -58,6 +61,13 @@
1.14 }
1.15 }
1.16
1.17 + module fillet_justified(r, h) {
1.18 + difference() {
1.19 + cube([r + extra, r + extra, h + extra]);
1.20 + cylinder(r = r, h = h);
1.21 + }
1.22 + }
1.23 +
1.24 /*
1.25 Justify an object of the given dimensions, according to the given
1.26 factors (where 1 indicates moving the object to the positive side of an
1.27 @@ -153,7 +163,7 @@
1.28 */
1.29
1.30 groove_width_exposed = GROOVE ? 1.5 : 0;
1.31 - groove_width = groove_width_exposed + groove_width_overlap;
1.32 + groove_width_normal = groove_width_exposed + front_back_overlap;
1.33 groove_depth = 1.0; /* how deep the groove goes into each side */
1.34
1.35 /* Additional cutting to mate the back and front. */
1.36 @@ -562,15 +572,51 @@
1.37 cube_at(width, back, height,
1.38 0, 1, 0,
1.39 0, int_back_depth, 0);
1.40 - cube_at(back_left, back_depth + groove_width_extra, height,
1.41 +
1.42 + cube_at(back_left, back_depth, height,
1.43 -1, 1, 0,
1.44 - -int_width / 2, -groove_width_extra, 0);
1.45 - cube_at(back_right, back_depth + groove_width_extra, height,
1.46 + -int_width / 2, 0, 0);
1.47 +
1.48 + cube_at(back_right, back_depth, height,
1.49 1, 1, 0,
1.50 - int_width / 2, -groove_width_extra, 0);
1.51 - cube_at(width, back_depth + groove_width_extra, top,
1.52 + int_width / 2, 0, 0);
1.53 +
1.54 + cube_at(width, back_depth, top,
1.55 0, 1, 1,
1.56 - 0, -groove_width_extra, int_payload_upper_extent);
1.57 + 0, 0, int_payload_upper_extent);
1.58 +
1.59 + /* The extension of the back to connect with the front. */
1.60 +
1.61 + difference() {
1.62 + cube_at(back_left - groove_depth, groove_width_extra, inner_side_front_cutout_height,
1.63 + -1, 1, 1,
1.64 + -int_width / 2, -groove_width_extra, -height / 2);
1.65 + translate([-int_width / 2 - groove_ro, -groove_width_extra + groove_ro,
1.66 + -height / 2])
1.67 + rotate([0, 0, -90])
1.68 + fillet_justified(groove_rr, inner_side_front_cutout_height);
1.69 + }
1.70 +
1.71 + difference() {
1.72 + cube_at(back_right - groove_depth, groove_width_extra, inner_side_front_cutout_height,
1.73 + 1, 1, 1,
1.74 + int_width / 2, -groove_width_extra, -height / 2);
1.75 + translate([int_width / 2 + groove_ro, -groove_width_extra + groove_ro,
1.76 + -height / 2])
1.77 + rotate([0, 0, 180])
1.78 + fillet_justified(groove_rr, inner_side_front_cutout_height);
1.79 + }
1.80 +
1.81 + difference() {
1.82 + cube_at(width - groove_depth * 2, groove_width_extra, top - top_groove_depth,
1.83 + 0, 1, 1,
1.84 + 0, -groove_width_extra, int_payload_upper_extent);
1.85 + translate([0, -groove_width_extra + groove_ro,
1.86 + int_payload_upper_extent + groove_ro])
1.87 + rotate([0, 0, 180])
1.88 + rotate([0, 90, 0])
1.89 + fillet(groove_rr, width - groove_depth * 2);
1.90 + }
1.91 }
1.92
1.93 difference() {
1.94 @@ -623,21 +669,21 @@
1.95
1.96 /* Left groove. */
1.97
1.98 - cube_at(groove_depth, groove_width, height,
1.99 + cube_at(groove_depth, groove_width_normal, height,
1.100 1, 1, 0,
1.101 - -width / 2, -groove_width_extra, 0);
1.102 + -width / 2, 0, 0);
1.103
1.104 /* Right groove. */
1.105
1.106 - cube_at(groove_depth, groove_width, height,
1.107 + cube_at(groove_depth, groove_width_normal, height,
1.108 -1, 1, 0,
1.109 - width / 2, -groove_width_extra, 0);
1.110 + width / 2, 0, 0);
1.111
1.112 /* Top grooves. */
1.113
1.114 - cube_at(width, groove_width, groove_depth,
1.115 + cube_at(width, groove_width_normal, groove_depth,
1.116 0, 1, -1,
1.117 - 0, -groove_width_extra, height / 2);
1.118 + 0, 0, height / 2);
1.119
1.120 cube_at(width, top_groove_width, top_groove_depth,
1.121 0, 1, -1,
1.122 @@ -743,6 +789,24 @@
1.123 translate([-width / 2 + ro, back_depth - ro, 0])
1.124 rotate([0, 0, 90])
1.125 fillet(rr, height);
1.126 +
1.127 + /* Outer edge rounding of the back extension. */
1.128 +
1.129 + translate([-width / 2 + groove_depth + groove_ro, -groove_width_extra + groove_ro,
1.130 + -height / 2])
1.131 + rotate([0, 0, 180])
1.132 + fillet_justified(groove_rr, inner_side_front_cutout_height);
1.133 +
1.134 + translate([width / 2 - groove_depth - groove_ro, -groove_width_extra + groove_ro,
1.135 + -height / 2])
1.136 + rotate([0, 0, -90])
1.137 + fillet_justified(groove_rr, inner_side_front_cutout_height);
1.138 +
1.139 + translate([0, -groove_width_extra + groove_ro,
1.140 + int_payload_upper_extent + inner_top_front_cutout_height - groove_ro])
1.141 + rotate([0, 0, 180])
1.142 + rotate([0, -90, 0])
1.143 + fillet(groove_rr, width - groove_depth * 2);
1.144 }
1.145 }
1.146