Last active
November 26, 2018 00:49
-
-
Save FFY00/2554db2c93d0471167b1ff01115ff390 to your computer and use it in GitHub Desktop.
Unisolder Frontplate - IPLeiria Hardware CTF Team
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
| /// Vars | |
| // Plaque | |
| width = 55; | |
| height = 25; | |
| round_radius = 5; | |
| tickness = 2.5; | |
| // Hole | |
| hole_diameter = 3.2; | |
| hole_distance = 4.54; | |
| // Text | |
| text = "IPLeiria"; | |
| subtext = "Hardware CTF Team"; | |
| font = "Monaco"; // Install ttf-monaco from AUR | |
| text_size = 5.5; | |
| subtext_size = 2.5; | |
| text_tickness = 1.5; | |
| subtext_tickness = 1; | |
| /// Design | |
| // Calculate edge coordinates | |
| edge_height = height/2 - round_radius; | |
| edge_width = width/2 - round_radius; | |
| // Calculate hole coordinates | |
| hole_height = 0; | |
| hole_width = width/2 - hole_distance; | |
| hole_radius = hole_diameter/2; | |
| // Plaque + Text | |
| union(){ | |
| // Plaque | |
| linear_extrude(height = tickness) difference(){ | |
| // Rounded edge rectangle | |
| hull(){ | |
| translate([edge_width, edge_height, 0]) circle(round_radius, $fn=80); | |
| translate([-edge_width, edge_height, 0]) circle(round_radius, $fn=80); | |
| translate([edge_width, -edge_height, 0]) circle(round_radius, $fn=80); | |
| translate([-edge_width, -edge_height, 0]) circle(round_radius, $fn=80); | |
| } | |
| // Holes | |
| translate([hole_width, hole_height, 0]) circle(hole_radius, $fn=80); | |
| translate([-hole_width, hole_height, 0]) circle(hole_radius, $fn=80); | |
| } | |
| // Text | |
| linear_extrude(height = tickness + text_tickness) | |
| translate([0, 3.5, 0]) text(text = text, size = text_size, font = font, | |
| valign = "center", halign = "center"); | |
| linear_extrude(height = tickness + subtext_tickness) | |
| translate([0, -3.5, 0]) text(text = subtext, size = subtext_size, font = font, | |
| valign = "center", halign = "center"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment