Add option to use chamfered endes instead of bevels
authorVáclav 'Ax' Hůla <axtheb@gmail.com>
Tue, 14 May 2013 07:57:05 +0000 (09:57 +0200)
committerVáclav 'Ax' Hůla <axtheb@gmail.com>
Tue, 14 May 2013 07:57:05 +0000 (09:57 +0200)
box_frame/configuration.scad.dist
box_frame/inc/functions.scad

index 42826aa..be46cb7 100644 (file)
@@ -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
index 7b61a41..72599d1 100644 (file)
@@ -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);
+        }
     }
 
 }