Skip to content

Instantly share code, notes, and snippets.

@sree314
Created July 6, 2022 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sree314/fe016f72096157ac4c7ea20a6ccec727 to your computer and use it in GitHub Desktop.
Save sree314/fe016f72096157ac4c7ea20a6ccec727 to your computer and use it in GitHub Desktop.
LED lead bender
module led_bender(
bend_distance = 3, /* mm */
depth_cut = 1, /* mm */
width = 10 ,
lead_separation = 2.54, /* mm */
)
{
lead_dia = 0.5;
lead_radius = lead_dia / 2 + 0.5; /* mm */
echo("lead_radius", lead_radius);
difference () {
difference() {
translate([-width/2,-width/2,0])
cube([width, width, width]);
cut_width = width / 2 - bend_distance - 0.1; //width/4;
translate([width/2-cut_width,
-width/2-0.1,
width-depth_cut+0.1])
cube([cut_width+0.1,width+0.2,depth_cut+0.1]);
}
translate([0,-lead_separation/2,0])
cylinder(r=lead_radius,h=width+0.01,$fn=24);
translate([0, lead_separation/2, 0])
cylinder(r=lead_radius,h=width+0.01,$fn=24);
}
stopper_width = lead_separation - lead_radius * 2 - 0.1;
echo("width", stopper_width);
/*translate([-1,lead_separation/2-stopper_width/2,0])
cube([2,stopper_width,width+bend_distance]);
*/
translate([0.2,-stopper_width/2,width])
rotate([-90, 0, 0]) {
cube([bend_distance,bend_distance,stopper_width]);
cylinder(r=bend_distance,stopper_width,$fn=24);
}
}
led_bender(bend_distance=3, width=10, depth_cut=2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment