Skip to content

Instantly share code, notes, and snippets.

@erikaheidi
Last active March 22, 2020 09:51
Show Gist options
  • Save erikaheidi/e0149417fea7bd29cd338f9b56d32e31 to your computer and use it in GitHub Desktop.
Save erikaheidi/e0149417fea7bd29cd338f9b56d32e31 to your computer and use it in GitHub Desktop.
Letter clay mold / stamp
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();
}
@erikaheidi
Copy link
Author

erikaheidi commented Mar 21, 2020

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:

  1. Open the code on OpenScad.
  2. Change the string variable to the letter / word of your choice.
  3. Adjust the height if necessary.
  4. Hit F5 for previewing.
  5. When satisfied, build (F6) and export the STL file for printing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment