Last active
May 5, 2022 17:17
-
-
Save vindolin/129f284832f4bb648a41090aee53849c to your computer and use it in GitHub Desktop.
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
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
* Based on Martin Wolkers (Neolker) Name Tag Generator from: * | |
* https://www.printables.com/model/98717-name-tag-generator-for-christmas-gifts * | |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
name = "Keyfob"; // The text you want to print | |
$fn = 255; // Quality of render, use this for final render | |
// $fn = 50; // Quality of render, use this for dev | |
firstOutlineWidth = 3; | |
secondOutlineWidth = 2; | |
firstHeight = 1.3; | |
secondHeight = 0.8; | |
textHeight = 1; | |
ringOffset = [-26, 2, firstHeight / 2]; // you need to tweak this, so that the ring is in the right position | |
// you can get this font at: https://fonts.google.com/specimen/Oleo+Script+Swash+Caps | |
font = "Oleo Script Swash Caps:style=Regular"; | |
module nameTag(offset, height) { | |
linear_extrude(height) { | |
offset(offset) { | |
text(name, size = 12, font = font, halign = "center", valign = "center"); | |
} | |
} | |
} | |
difference() { | |
union() { | |
color("Red") translate([0, 0, firstHeight + secondHeight]) nameTag(0, textHeight); // text | |
color("White") translate([0, 0, firstHeight]) nameTag(secondOutlineWidth, secondHeight); // white | |
color("Black") translate([0, 0, 0]) nameTag(firstOutlineWidth, firstHeight); // black | |
color("Black") translate(ringOffset) cylinder(firstHeight, 6, 6, true); // outer ring | |
} | |
color("Black") translate(ringOffset) cylinder(firstHeight * 2 , 2.4, 2.4, true); // ring hole | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment