Grasshopper

algorithmic modeling for Rhino

For my latest 3D printing project I needed 2 pieces that screwed together. I looked for a GH script that created helical threads but could not find one. What I did find, however, were 2 scripts that were very helpful: the first one showed a very simple way to create a helical curve, and the second showed how to use the Rail Revolution object to extrude a triangle along 3D curve. I had not been aware of this object before and it works really well.

So I used these 2 methods to construct the cluster in the attached GH file.

Since achieving close tolerances with 3D printing is a trial and error process I made all the parameters tuneable via sliders. Their names pretty well describe what each slider does, but there are a few things worth noting:

# Threads is not the actual number of threads on the final part. What it does is control the number of rotations the threads make. I probably should have done something with degrees, radians, and 360 degree revolutions. But I didn't.

Thread Pitch controls the tightness of the threads.

These 2 combined control the overall height of the final result. Since there is no direct way to control the height of the part the actual height is provided by the Height value of the cluster.

The Top Adj. slider is a trick I could not find a way to avoid - essentially because I could not find a way to get the intersection point of a Rail Revolution with a cylinder. So what the Top Adj. slider does is let you whack off the top if the part to the point where you eliminate the left-over part of the thread that sticks out and prevents it from mating with the female part. (This is lots easier to see directly in GH than it is to describe in words.)

Finally, to make the female part I used the ScaleNU object to scale the threads up just enough to let the 2 parts twist together easily. Scale only the X & Y dimension and then use SDiff to make the proper opening. The scale value varies depending on the actual geometry used. For my part I set it to 1.1, but it took several tests to determine this value.

Views: 642

Attachments:

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service