Skip to content

Instantly share code, notes, and snippets.

@cashlo
Created June 10, 2026 13:59
Show Gist options
  • Select an option

  • Save cashlo/e2edd4a1c6825b1dc9b44543f75c5e7a to your computer and use it in GitHub Desktop.

Select an option

Save cashlo/e2edd4a1c6825b1dc9b44543f75c5e7a to your computer and use it in GitHub Desktop.
jsk_makerchip.scad
include <BOSL2/std.scad>
difference(){
color("white")
cyl(h=3, d=40, $fn=100, chamfer=0.5); // Increased $fn for a smooth circle
engraved_text(); // Renamed to avoid recursion
up(1.5-0.2)
curved_text(0.05, 0.2);
}
*engraved_text();
module curved_text(offset = 0, extrude=0.2){
txt1 = "東京大学";
color("black")
linear_extrude(extrude)
offset(offset)
arc_copies(r=15, n=len(txt1), sa=90+45, ea=180+45)
text(txt1[len(txt1) - 1 - $idx], size=5, anchor="center", font="Noto Sans JP:style=light", spin=-90);
txt2 = "情報システム工学研究室";
color("black")
linear_extrude(extrude)
offset(offset)
arc_copies(r=16, n=len(txt2), sa=-100, ea=100)
// Use native OpenSCAD string indexing
text(txt2[$idx], size=4, anchor="center", font="Noto Sans JP:style=light", spin=90);
}
module engraved_text(){
color("black")
down(1.51)
linear_extrude(0.5)
mirror([0,1,0])
offset(0.01)
scale(0.33)
import("jsk_qr.svg", center=true);
up(1.5 - 0.5)
color("black")
linear_extrude(0.51)
text("JSK", size=9, anchor="center", font="Noto Sans JP:style=bold", spin=90);
up(1.5-0.4)
curved_text(0.2, 0.2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment