While you can just bung the STL onto your printer and produce a blank badge, where's the fun in that?
I have provided an STL file for direct printing and a .blend file with somewhat cleaned up geometry for customisation.
| module s75_badge() { | |
| resolution = 48; // Number of faces in rounded edges | |
| hole_diameter = 2.5; // Screw hole diameter in mm, roughly m2 with some tolerance | |
| // Counter-sink with a spherical profile by subtracting a sphere from the bottom | |
| // side of a hole. A larger radius and lower depth give a gentler profile. | |
| countersink_radius = 3; | |
| countersink_depth = 1.5; | |
| // Dimensions of the lower portion of the badge, with the holes | |
| base_width = 24.7; | |
| base_height = 37.2; | |
| base_thickness = 3.6; | |
| // Dimensions of the upper portion of the badge | |
| top_width = 19.2; | |
| top_height = base_height; | |
| top_thickness = base_thickness; | |
| // The distance from the corners to the center of the screw holes. | |
| // Also used as the radius to round the corners. | |
| corner_radius = 3.3; | |
| // Give us a sensible orientation | |
| rotate([90, 0, 180]) | |
| translate([-base_width, 0, -base_height]) | |
| difference() { | |
| union(){ | |
| difference() { | |
| // The main body of the badge | |
| union() { | |
| cube([base_width, base_thickness, base_height]); | |
| translate([base_width - top_width, base_thickness, 0]) | |
| cube([top_width, top_thickness, top_height]); | |
| } | |
| // Cut out corners | |
| union() { | |
| cube([corner_radius, base_thickness, corner_radius]); | |
| translate([0, 0, base_height - corner_radius]) | |
| cube([corner_radius, base_thickness, corner_radius]); | |
| } | |
| } | |
| union() { | |
| // Replace with rounded corners | |
| rotate([90, 0, 0]) | |
| translate([corner_radius, corner_radius, -base_thickness]) | |
| cylinder(h = base_thickness, r = corner_radius, center = false, $fn=resolution); | |
| rotate([90, 0, 0]) | |
| translate([corner_radius, base_height - corner_radius, -base_thickness]) | |
| cylinder(h = base_thickness, r = corner_radius, center = false, $fn=resolution); | |
| } | |
| } | |
| // Screw holes | |
| union() { | |
| hole_radius = hole_diameter / 2; | |
| rotate([90, 0, 0]) | |
| translate([corner_radius, corner_radius, -base_thickness]) | |
| cylinder(h = base_thickness, r = hole_radius, center = false, $fn=resolution); | |
| rotate([90, 0, 0]) | |
| translate([corner_radius, base_height - corner_radius, -base_thickness]) | |
| cylinder(h = base_thickness, r = hole_radius, center = false, $fn=resolution); | |
| // Spherical counter-sink | |
| depth = countersink_radius - countersink_depth; | |
| translate([corner_radius, -depth, corner_radius]) | |
| sphere(r = countersink_radius, $fn=resolution); | |
| translate([corner_radius, -depth, base_height - corner_radius]) | |
| sphere(r = countersink_radius, $fn=resolution); | |
| } | |
| } | |
| } | |
| s75_badge();; |