Skip to content

Instantly share code, notes, and snippets.

@j0uni
Created April 7, 2015 09:56
Show Gist options
  • Save j0uni/b3d8b1e284ed27723cbf to your computer and use it in GitHub Desktop.
Save j0uni/b3d8b1e284ed27723cbf to your computer and use it in GitHub Desktop.
OpenSCAD script to make lots of M3 size spacers
module spacer_m3($height)
{
rotate([90,0,0])
difference()
{
cylinder(r=5.5/2, $fn=6, h=$height);
translate([0,0,-$height/2]) cylinder(r=3.2/2, $fn=60, h=$height*2);
}
}
for (i = [0:7])
{
translate([i*10,0,0]) spacer_m3(30);
}
for (i = [0:7])
{
translate([i*10,20,0]) spacer_m3(15);
}
for (i = [0:7])
{
translate([i*10,30,0]) spacer_m3(5);
}
for (i = [0:7])
{
translate([i*10,30+25,0]) spacer_m3(20);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment