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.

Revisions

  1. davidsharp revised this gist Oct 25, 2025. 1 changed file with 8 additions and 7 deletions.
    15 changes: 8 additions & 7 deletions jack-o-lantern-mouth.scad
    Original file line number Diff line number Diff line change
    @@ -8,24 +8,25 @@ module smile(){
    circle(radius+15);
    }
    }
    module teeth(top,bot){
    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,90])
    circle(8,$fn=3);
    rotate([0,0,tooth_rot])
    circle(8,$fn=sides);
    }
    for(i=[1:1:bot]){
    rotate([0,0,90+((180/top)*i)])
    rotate([0,0,90+((180/bot)*i)])
    translate([0,radius,0])
    rotate([0,0,90+180])
    circle(5,$fn=3);
    rotate([0,0,tooth_rot+180])
    circle(5,$fn=sides);
    }
    }

    linear_extrude(3)
    difference(){
    smile();
    teeth(13,12);
    teeth(13,12,4);
    }
  2. davidsharp revised this gist Oct 25, 2025. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions jack-o-lantern-mouth.scad
    Original file line number Diff line number Diff line change
    @@ -11,13 +11,13 @@ module smile(){
    module teeth(top,bot){
    for(i=[1:1:top]){
    translate([0,40,0])
    rotate([0,0,(360/top)*i])
    rotate([0,0,90+((180/top)*i)])
    translate([0,radius+15,0])
    rotate([0,0,90])
    circle(8,$fn=3);
    }
    for(i=[1:1:bot]){
    rotate([0,0,(360/bot)*i])
    rotate([0,0,90+((180/top)*i)])
    translate([0,radius,0])
    rotate([0,0,90+180])
    circle(5,$fn=3);
    @@ -27,5 +27,5 @@ module teeth(top,bot){
    linear_extrude(3)
    difference(){
    smile();
    teeth(27,24);
    teeth(13,12);
    }
  3. davidsharp created this gist Oct 25, 2025.
    31 changes: 31 additions & 0 deletions jack-o-lantern-mouth.scad
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    radius = 50;

    module smile(){
    difference(){
    translate([0, 0, 0])
    circle(radius);
    translate([0, 40, 0])
    circle(radius+15);
    }
    }
    module teeth(top,bot){
    for(i=[1:1:top]){
    translate([0,40,0])
    rotate([0,0,(360/top)*i])
    translate([0,radius+15,0])
    rotate([0,0,90])
    circle(8,$fn=3);
    }
    for(i=[1:1:bot]){
    rotate([0,0,(360/bot)*i])
    translate([0,radius,0])
    rotate([0,0,90+180])
    circle(5,$fn=3);
    }
    }

    linear_extrude(3)
    difference(){
    smile();
    teeth(27,24);
    }