I've come to notice some nice design patterns while building parts to work with Metric hardware, and I thought I would share.
Simple stuff, but it ends up meaning I need to keep less stuff in my brain while doing it. That is usually a good thing.
Size as used here is just the M number of the part, such as M3, M4. Size is expressed as a diameter, with most OpenSCAD operations using radius, so <dia>/2.
Clearance as used here is always 0.2mm, and that number came to be to allow over-extruding while printing to not affect the fit of the final parts.
- Through holes bolt sizes are just <size> + <clearance>. So a cylinder to subtract for a bolt hole is:
cylinder(r=(size+clearance)/2,center=true);
- Pan heads are always 2*<size> + <clearance> for diameter, and <size> for height. So a cylinder to subtract to flush fit the head of a bolt would be:
cylinder(r=size+clearance/2,h=size,center=true);
- Encapsulating a nut or bolt head is just as easy. Nuts are the same dimensions as pan heads, but you limit the cylinder to 6 facets. The cylinder with 6 facets still has its vertices on the ideal cylinder, but the flats end up moving in the same as a nut. So a cylinder to subtract to create a captive nut is just:
cylinder(r=size+clearance/2,h=size,$fn=6,center=true);
- Threaded holes are <size> *0.9. So a cylinder to accept directly threading in a bolt is just:
cylinder(r=size*0.9/2,center=true);
That's it. Four simple rules and can you can use any metric hardware without measuring. I've never actually looked up if there is a specification which matches these observations, but so far so good.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.