Skip to content

Instantly share code, notes, and snippets.

@FFY00
Last active November 26, 2018 00:49
Show Gist options
  • Save FFY00/2554db2c93d0471167b1ff01115ff390 to your computer and use it in GitHub Desktop.
Save FFY00/2554db2c93d0471167b1ff01115ff390 to your computer and use it in GitHub Desktop.
Unisolder Frontplate - IPLeiria Hardware CTF Team
/// 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");
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment