Skip to content

Instantly share code, notes, and snippets.

@davidsharp
Last active October 25, 2025 15:07
Show Gist options
  • Save davidsharp/9a9ee272fffa58b666d4d519a63731d6 to your computer and use it in GitHub Desktop.
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
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