# HG changeset patch # User Paul Boddie # Date 1412769286 -7200 # Node ID 5dda66a506fa17812cf3d5b05599ff19e20ae1c9 # Parent 37592a06218d608b10faa86132b13442cc63e4cc Added an option to turn off filleting for quicker previewing. diff -r 37592a06218d -r 5dda66a506fa cartridge.scad --- a/cartridge.scad Wed Oct 08 13:39:18 2014 +0200 +++ b/cartridge.scad Wed Oct 08 13:54:46 2014 +0200 @@ -41,6 +41,10 @@ APART = 1; PCB = 0; + /* To save time (before printing): FILLET = 0; */ + + FILLET = 1; + /* Rounding/fillet radius and additional margin of subtracted material. The additional margin helps avoid geometry problems. @@ -59,32 +63,35 @@ /* A fillet performs rounding using a quarter segment of a cylinder. */ module fillet(r, h) { - translate([0, 0, -h/2]) + if (FILLET) + translate([0, 0, -h/2]) + difference() { + cube([r + extra, r + extra, h + extra]); + cylinder(r = r, h = h); + } + } + + module fillet_justified(r, h) { + if (FILLET) difference() { cube([r + extra, r + extra, h + extra]); cylinder(r = r, h = h); } } - module fillet_justified(r, h) { - difference() { - cube([r + extra, r + extra, h + extra]); - cylinder(r = r, h = h); - } - } - module fillet_torus(radius, rounding) { - difference() { - cube_at((radius + extra) * 2, (radius + extra) * 2, rounding + extra, - 0, 0, 1, - 0, 0, 0); - union() { - rotate_extrude(convexity = 10) - translate([radius - rounding, 0, 0]) - circle(r = rounding); - cylinder(r = radius - rounding, h = rounding); + if (FILLET) + difference() { + cube_at((radius + extra) * 2, (radius + extra) * 2, rounding + extra, + 0, 0, 1, + 0, 0, 0); + union() { + rotate_extrude(convexity = 10) + translate([radius - rounding, 0, 0]) + circle(r = rounding); + cylinder(r = radius - rounding, h = rounding); + } } - } } /*