Last active
October 25, 2025 15:07
-
-
Save davidsharp/9a9ee272fffa58b666d4d519a63731d6 to your computer and use it in GitHub Desktop.
A rough little thing for generating rough little jack-o-lantern mouths in openscad
This file contains hidden or 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
| radius = 50; | |
| module smile(){ | |
| difference(){ | |
| translate([0, 0, 0]) | |
| circle(radius); | |
| translate([0, 40, 0]) | |
| circle(radius+15); | |
| } | |
| } | |
| module teeth(top,bot,sides=3){ | |
| tooth_rot = sides == 4 ? 45 : 90; | |
| for(i=[1:1:top]){ | |
| translate([0,40,0]) | |
| rotate([0,0,90+((180/top)*i)]) | |
| translate([0,radius+15,0]) | |
| rotate([0,0,tooth_rot]) | |
| circle(8,$fn=sides); | |
| } | |
| for(i=[1:1:bot]){ | |
| rotate([0,0,90+((180/bot)*i)]) | |
| translate([0,radius,0]) | |
| rotate([0,0,tooth_rot+180]) | |
| circle(5,$fn=sides); | |
| } | |
| } | |
| linear_extrude(3) | |
| difference(){ | |
| smile(); | |
| teeth(13,12,4); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment