Created
September 22, 2024 16:56
-
-
Save 641i130/c42570e64f4ab4f178c97167b0165bc5 to your computer and use it in GitHub Desktop.
Japanese vocabulary word generator tag thing
This file contains 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
/// This script will generate 3D objects of word tags for language learning purposes | |
scale([3,3,3]) { | |
// word values | |
word = "心配-しんぱい"; | |
word_h = 1; | |
font_size = 4; | |
// base values | |
base = 4; | |
height = 0.5; | |
linear_extrude(height = word_h) | |
translate([0, 0, 0]) | |
offset(0.001) // will be fixed with manifold in a newer release | |
text(word, font="Noto Sans CJK JP", size = font_size, valign = "center", $fn = 100, halign= "center"); | |
// Make a rounded base | |
difference() { | |
hull() { | |
translate([len(word)*2.75, 1, 0]) | |
cylinder(h=height, r = base, $fn = 100); | |
translate([len(word)*-2.75, -1, 0]) | |
cylinder(h=height, r = base, $fn = 100); | |
translate([-len(word)*2.75, 1, 0]) | |
cylinder(h=height, r = base, $fn = 100); | |
translate([len(word)*2.75, -1, 0]) | |
cylinder(h=height, r = base, $fn = 100); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment