Skip to content

Instantly share code, notes, and snippets.

@GravisZro
Last active October 16, 2021 00:53
Show Gist options
  • Select an option

  • Save GravisZro/290bd87bbd506143ac1d8e3ca5679150 to your computer and use it in GitHub Desktop.

Select an option

Save GravisZro/290bd87bbd506143ac1d8e3ca5679150 to your computer and use it in GitHub Desktop.
screw.scad
module screw(step, height, reps)
{
for(i = [0 : step : 360 * reps])
{
translate([0, 0, i/360 * height])
rotate([0, 0, i])
cube([1, height, height/2], false);
}
}
rotate([-90, 0, 0])
{
cylinder(h = 40, d = .5, center=true);
translate([0,0,10])
{
for(x=[0 : 3 : 9])
{
translate([0,0,x])
cylinder(h = 2.25, d = 10, center=true);
}
}
translate([0,0,-20])
{
color( "red", 0.5 )
screw(1, 5, 5);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment