From 4edfdf22fcafac2c2d654223b050fa14726f6566 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20=27Ax=27=20H=C5=AFla?= Date: Tue, 14 May 2013 09:57:05 +0200 Subject: [PATCH] Add option to use chamfered endes instead of bevels --- box_frame/configuration.scad.dist | 6 +++++- box_frame/inc/functions.scad | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/box_frame/configuration.scad.dist b/box_frame/configuration.scad.dist index 42826aa..be46cb7 100644 --- a/box_frame/configuration.scad.dist +++ b/box_frame/configuration.scad.dist @@ -75,13 +75,17 @@ idler_bearing = bearing_624_double; carriage_l_base = 50; // Fillets ******************************************************************** +// fillets are rounded corners of boxes. The right engineering term is probably radius +// but cad software calls it fillet. // mostly cosmetic, except z axis. // 0 = no fillets // 1 = fillet +// 2 = chamfer (cut the edges at 45deg. angle) +// Please do put only parts with fillets on sale, other options are not really tested use_fillets = 1; -//set to 0 for single plate (affects z axis and screws that attach RP parts tp frame) +//set to 0 for single plate (affects z axis and screws that attach RP parts to frame) i_am_box = 1; //if you do your own plate and can move bottom Z screws 5mm up set this to 0 to diff --git a/box_frame/inc/functions.scad b/box_frame/inc/functions.scad index 7b61a41..72599d1 100644 --- a/box_frame/inc/functions.scad +++ b/box_frame/inc/functions.scad @@ -45,7 +45,7 @@ module fillet(radius, height=100, $fn=0) { module cube_fillet(size, radius=-1, vertical=[3,3,3,3], top=[0,0,0,0], bottom=[0,0,0,0], center=false, $fn=0){ // - if (use_fillets) { + if (use_fillets == 1) { if (center) { cube_fillet_inside(size, radius, vertical, top, bottom, $fn); } else { @@ -53,7 +53,17 @@ module cube_fillet(size, radius=-1, vertical=[3,3,3,3], top=[0,0,0,0], bottom=[0 cube_fillet_inside(size, radius, vertical, top, bottom, $fn); } } else { - cube(size, center); + if (use_fillets == 2) { + if (center) { + cube_fillet_inside(size, radius, vertical, top, bottom, 4); + } else { + translate([size[0]/2, size[1]/2, size[2]/2]) + cube_fillet_inside(size, radius, vertical, top, bottom, 4); + } + + } else { + cube(size, center); + } } } -- 2.20.1