Skip to content

Instantly share code, notes, and snippets.

@Stemer114
Last active August 29, 2015 14:26
Show Gist options
  • Save Stemer114/14d3ad1470e53edebc96 to your computer and use it in GitHub Desktop.
Save Stemer114/14d3ad1470e53edebc96 to your computer and use it in GitHub Desktop.
screw with hex head
// screw with hex head
// useful for modelling attachment bores
// with nut trap
// default values are for M3 (5.5mm head) screw 20mm (3.2mm bore for tolerance)
// param membrane thickness is for additional layer between head and shaft,
// for upside down printing, usually set this to your layer thickness
module hexhead_screw(
length=20, //per definition, excluding head
head_wrenchsize = 5.6,
head_thickness = 3,
screw_dia = 3.2, //shaft dia
support_thickness = 0 //support thickness, if any (default 0)
)
{
union() {
cylinder(r = head_wrenchsize / 2 / cos(180 / 6) + 0.05, h=head_thickness, $fn=6);
translate([0, 0, head_thickness+support_thickness])
polyhole(h=length, d=screw_dia);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment