1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01:00

Merge pull request #12 from chill1n/box_extrude

Box extrude extension
This commit is contained in:
Justin Lin 2020-07-02 20:51:01 +08:00 committed by GitHub
commit 5d5ecc846f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
linear_extrude(shell_thickness + bottom_thickness_delta, scale = scale / height * shell_thickness, convexity = convexity)
offset(delta = -shell_thickness * 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,
}
}
}