deadsy / sdfx

A simple CAD package using signed distance functions
MIT License
533 stars 52 forks source link

Add NPT threads #39

Closed soypat closed 3 years ago

soypat commented 3 years ago

Resolves #38. I haven't tested it thoroughly. I know it sort of breaks for very long screws (10 inch long 1/2 diameter) but it works wonders for my use case. I've added some threads to the database too.

image

deadsy commented 3 years ago

When your building bolts/plugs with a tapered thread keep in mind that Screw3D() builds a thread centered about the origin on the z-axis. Because of the taper the major thread diameter will be greater than or less than the nominal thread diameter as you move along the z-axis. This will effect the thread engagement when you screw it into something. You may wish to build the thread with some extra length and then cut it down so the maximum diameter is what you want.