Last active
February 2, 2021 10:17
-
-
Save LeLocTai/cc67ddcd70e2fe11e67f1ffe4cb7c12e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeBox(w, h, l, thick){ | |
return difference( | |
cube({size: [w + thick, h+thick, l], center: true}), | |
translate( | |
[0,0,thick], | |
cube({size: [w, h, l], center: true}) | |
) | |
) | |
} | |
function cutOut(toCut, radius, depth, offset){ | |
var start = offset; | |
var end = [...offset]; | |
end[1] += depth; | |
return difference( | |
toCut, | |
cylinder( { | |
start, | |
end, | |
r1: radius, r2: radius | |
} ) | |
) | |
} | |
function deckbox () { | |
var box = makeBox(50, 15, 80, 1.6); | |
return cutOut(box, 25, 10, [0,0,60]); | |
} | |
function main () { | |
return deckbox(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment