1.1 --- a/cartridge.scad Wed Oct 08 00:43:47 2014 +0200
1.2 +++ b/cartridge.scad Wed Oct 08 13:39:18 2014 +0200
1.3 @@ -50,9 +50,14 @@
1.4 ro = rr;
1.5 extra = 0.1;
1.6
1.7 - groove_rr = 0.5;
1.8 + groove_rr = 0.2;
1.9 groove_ro = groove_rr;
1.10
1.11 + pcb_lug_rr = 0.5;
1.12 + pcb_lug_ro = pcb_lug_rr;
1.13 +
1.14 + /* A fillet performs rounding using a quarter segment of a cylinder. */
1.15 +
1.16 module fillet(r, h) {
1.17 translate([0, 0, -h/2])
1.18 difference() {
1.19 @@ -68,6 +73,20 @@
1.20 }
1.21 }
1.22
1.23 + module fillet_torus(radius, rounding) {
1.24 + difference() {
1.25 + cube_at((radius + extra) * 2, (radius + extra) * 2, rounding + extra,
1.26 + 0, 0, 1,
1.27 + 0, 0, 0);
1.28 + union() {
1.29 + rotate_extrude(convexity = 10)
1.30 + translate([radius - rounding, 0, 0])
1.31 + circle(r = rounding);
1.32 + cylinder(r = radius - rounding, h = rounding);
1.33 + }
1.34 + }
1.35 + }
1.36 +
1.37 /*
1.38 Justify an object of the given dimensions, according to the given
1.39 factors (where 1 indicates moving the object to the positive side of an
1.40 @@ -363,6 +382,8 @@
1.41 0, 0, 0);
1.42 }
1.43 cylinder(h=pcb_lug_depth, r=pcb_lug_inner_radius);
1.44 + translate([0, 0, pcb_lug_depth - pcb_lug_ro])
1.45 + fillet_torus(pcb_lug_outer_radius, pcb_lug_rr);
1.46 }
1.47 }
1.48