Last active
March 22, 2020 09:51
-
-
Save erikaheidi/e0149417fea7bd29cd338f9b56d32e31 to your computer and use it in GitHub Desktop.
Letter clay mold / stamp
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 characters
font = "DejaVu Sans:style=Bold"; | |
letter_size = 40; | |
height = 8; | |
string = "DEV"; | |
textlen = len(string); | |
box_width = letter_size*textlen*1.1; | |
box_height = letter_size*1.2; | |
module mytext() { | |
text(string, size = letter_size, font = font, halign = "center", valign = "center", $fn = 64); | |
} | |
module base() { | |
linear_extrude(1) { | |
square([box_width, box_height], center = true); | |
} | |
} | |
module text_outline() { | |
linear_extrude(height) { | |
difference() { | |
offset(r = -1) { | |
mytext(); | |
} | |
offset(r = -2) { | |
mytext(); | |
} | |
} | |
} | |
} | |
rotate([-180,0,0]) | |
union() { | |
text_outline(); | |
translate([0,0,height]) base(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may need to change the font to a font supported by your system. Check the OpenScad menu
Help
->Font List
for a list of available fonts.Quick Instructions:
string
variable to the letter / word of your choice.F5
for previewing.F6
) and export the STL file for printing.