Last active
October 26, 2025 13:35
-
-
Save davidsharp/e1da5ec8487dd33fe7a3df780d9751ec to your computer and use it in GitHub Desktop.
Revisions
-
davidsharp revised this gist
Oct 26, 2025 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,25 +8,27 @@ module smile(){ circle(radius+15); } } module teeth(top,bot,top_gap=8,bot_gap=10,sides=3){ tooth_rot = sides == 4 ? 45 : 90; top_offset = top % 2 == 0 ? 0.5 : 0; bot_offset = bot % 2 == 0 ? 0.5 : 0; for(i=[0:1:top-1]){ translate([0,40,0]) rotate([0,0,180+((i+top_offset-1)*top*top_gap)]) translate([0,radius+15,0]) rotate([0,0,tooth_rot]) circle(8,$fn=sides); } for(i=[0:1:bot-1]){ rotate([0,0,180+((i+bot_offset-1)*bot*bot_gap)]) translate([0,radius,0]) rotate([0,0,tooth_rot+180]) circle(6,$fn=sides); } } linear_extrude(3) difference(){ smile(); teeth(3,2,8,15,3); } -
davidsharp revised this gist
Oct 26, 2025 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,14 +10,14 @@ module smile(){ } module teeth(top,bot,sides=3){ tooth_rot = sides == 4 ? 45 : 90; for(i=[0:1:top-1]){ translate([0,40,0]) rotate([0,0,180+(i*top*8)-(top*8)]) translate([0,radius+15,0]) rotate([0,0,tooth_rot]) circle(8,$fn=sides); } for(i=[0:1:bot-1]){ rotate([0,0,180+(i*bot*8)-(bot*8)]) translate([0,radius,0]) rotate([0,0,tooth_rot+180]) @@ -28,7 +28,5 @@ module teeth(top,bot,sides=3){ linear_extrude(3) difference(){ smile(); teeth(3,3,3); } -
davidsharp created this gist
Oct 26, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ 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=[0:1:top]){ translate([0,40,0]) rotate([0,0,180+(i*top*8)-(top*8)]) translate([0,radius+15,0]) rotate([0,0,tooth_rot]) circle(8,$fn=sides); } for(i=[0:1:bot]){ rotate([0,0,180+(i*bot*8)-(bot*8)]) translate([0,radius,0]) rotate([0,0,tooth_rot+180]) circle(5,$fn=sides); } } linear_extrude(3) difference(){ smile(); teeth(2,2,3); } // wrong, but kinda works in this instance, lol