Created
June 8, 2019 20:14
-
-
Save themainframe/cc0acd2dd2266c8ab4eb8c67a7ff850d to your computer and use it in GitHub Desktop.
Appleite OpenSCAD Definition
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
module Appleite(xCount=5, yCount=5, holeSize=20, padding=3, depth=10) { | |
difference() { | |
holeDistance = holeSize + padding; | |
cube([ | |
xCount * holeDistance, | |
yCount * holeDistance - (holeDistance / 2), | |
depth | |
]); | |
for(x = [0 : xCount], y = [0 : yCount]) { | |
// Offset every other row | |
xOffset = y % 2 != 0 ? holeDistance / 2 : 0; | |
// Front hole | |
translate([ | |
x * holeDistance + xOffset, | |
y * holeDistance * cos(30), | |
depth + 0.6 | |
]) sphere(d=holeSize); | |
// Back hole (OwO) | |
translate([ | |
x * holeDistance + xOffset, | |
(y * holeDistance + holeDistance * 0.66) * cos(30), | |
-0.6 | |
]) sphere(d=holeSize); | |
} | |
} | |
} | |
Appleite(); |
Author
themainframe
commented
Jun 8, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment