From 3258596d85ab1e7fc03ca26e5792b04ea0e4ac00 Mon Sep 17 00:00:00 2001 From: chilL1n Date: Wed, 1 Jul 2020 14:53:29 +0200 Subject: [PATCH] extended box_extrude with bottom_thickness_delta and convexity parameters --- src/box_extrude.scad | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/box_extrude.scad b/src/box_extrude.scad index 347fe7d3..66229784 100644 --- a/src/box_extrude.scad +++ b/src/box_extrude.scad @@ -8,16 +8,17 @@ * **/ -module box_extrude(height, shell_thickness, - offset_mode = "delta", chamfer = false, +module box_extrude(height, shell_thickness, + bottom_thickness_delta = 0.0, + offset_mode = "delta", chamfer = false, convexity = 3, twist, slices, scale) { - linear_extrude(shell_thickness, scale = scale / height * shell_thickness) - offset(delta = -shell_thickness * 0.99999, chamfer = chamfer) + linear_extrude(shell_thickness + bottom_thickness_delta, scale = scale / height * (shell_thickness + bottom_thickness_delta), convexity = convexity) + offset(delta = -(shell_thickness + bottom_thickness_delta)* 0.99999, chamfer = chamfer) children(); - linear_extrude(height, twist = twist, slices = slices, scale = scale) + linear_extrude(height, convexity = convexity, twist = twist, slices = slices, scale = scale) difference() { children(); if(offset_mode == "delta") { @@ -29,5 +30,3 @@ module box_extrude(height, shell_thickness, } } } - - \ No newline at end of file