diff --git a/vitamins/extrusion.scad b/vitamins/extrusion.scad index 7768006..4ecb965 100644 --- a/vitamins/extrusion.scad +++ b/vitamins/extrusion.scad @@ -43,7 +43,7 @@ module extrusion_cross_section(type, cornerHole) { fillet = extrusion_fillet(type); cornerSize = (width-channelWidth)/2; cornerSquare = (width-extrusion_channel_width_internal(type))/2; - cornerHoleDiameter =extrusion_corner_hole(type); + cornerHoleDiameter = extrusion_corner_hole(type); translate([-width/2,-width/2]) { difference() { @@ -57,7 +57,7 @@ module extrusion_cross_section(type, cornerHole) { translate([fillet,fillet]) square([cornerSquare-fillet,cornerSquare-fillet]); } - if(cornerHole) + if(cornerHole && cornerHoleDiameter > 0) translate([cornerSquare/2,cornerSquare/2]) circle(d=cornerHoleDiameter); } @@ -117,12 +117,12 @@ module extrusion_cross_section(type, cornerHole) { extrusion_center_section(type); } -module extrusion(type, length, cornerHole = false) { //! Draw the specified extrusion +module extrusion(type, length, center = false, cornerHole = false) { //! Draw the specified extrusion - vitamin(str("extrusion(", type[0], ", ", length, "): Extrusion ", type[0], " x ", length, "mm")); + vitamin(str("extrusion(", type[0], ", ", length, ", ", center, "): Extrusion ", type[0], " x ", length, "mm")); color(grey90) - linear_extrude(height = length) + linear_extrude(length, center = center) extrusion_cross_section(type, cornerHole); } diff --git a/vitamins/extrusions.scad b/vitamins/extrusions.scad index 159f609..10c2e62 100644 --- a/vitamins/extrusions.scad +++ b/vitamins/extrusions.scad @@ -20,10 +20,10 @@ // Extrusion // // W H d1 d2 s cw cwi t st f -E2020 = [ "E2020", 20, 20, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ]; -E2040 = [ "E2040", 20, 40, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ]; -E2060 = [ "E2060", 20, 60, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ]; -E2080 = [ "E2080", 20, 80, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ]; +E2020 = [ "E2020", 20, 20, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ]; +E2040 = [ "E2040", 20, 40, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ]; +E2060 = [ "E2060", 20, 60, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ]; +E2080 = [ "E2080", 20, 80, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ]; E3030 = [ "E3030", 30, 30, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ]; E3060 = [ "E3060", 30, 60, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ]; E4040 = [ "E4040", 40, 40, 10.5, 6.0, 15, 10, 20.0, 5.5, 3, 1 ];