Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Spring with a very general pitch
ladislav_schejbal
Member Posts: 9 ✭
in Drawings
A spring with a completely general variable pitch.
I wanted to use the Loft function, but it doesn't work with the Bézier curve.
I wanted to use the edge of a square profile as the leading curve.
Tagged:
0
Comments
Square section
Spring | Part Studio 1 (onshape.com)
Just for info:
Spring | Part Studio 1 (onshape.com)
https://cad.onshape.com/documents/57acdfaae4b005c413ed9b6f/w/3fd585a46d3af1b3ba413c53/e/9f334d884b522c64159c0322
I'd love to see a video explaining your workflow or the equations you're using.
https://cad.onshape.com/documents/509fbb825e08a1856bbe5dde/w/8b721817ffbe23752bd59d97/e/fe41ec3c9dca768c5eb95bc9
2) Craft the pieces of each function for the various behaviors.
3) Combine into 3 functions to make the final curve
4) Sweep
For this model:
R = 20mm
Constant
Th = #t*10*360*degree
10 circles one after the other corresponding to the number of coils
Z = 1.19*50mm*(atan(8*(#t-.5)))/(180deg)
Inverse tangent yields an S shaped curve with a slope/derivative that looks like a bell curve. So, Z ends up moving slowly, then fast, then slowly again. That’s how you get the bunching up at the beginning and end of the curve.
So it was done,
SpringBézier curve - Wrap -Thicken - Sweep | Part Studio 1 (onshape.com)
Innovative Woodworking Tools - www.nxtul.com
Sure, no problem. I hope this helps
Here's the Z function in question:
Z = 1.19*50mm*(atan(8*(#t-.5)))/(180deg)
I agree. It's not very intuitive at first glance. It took me a second to remember why I used this particular form.
Replacing the numbers with generic variables:
Z = D*E*(atan(A*(#t-B)))/C + F
A: This number is somewhat subjective. Multiplying the input to the Arctan function scales/stretches the shape and dictates what portion of the function you want to use, or in other words how much the curve/spring pitch is compressed at the beginning and end. It also dictates where this change in pitch occurs. Increasing this number stretches the spring. Decreasing it compresses it. 8 just seemed like a reasonable compromise
B: Arctan(t) naturally starts negative and has an inflection point at t=0. I want this inflection point to correspond to the middle of the spring. Since #t goes from 0 to 1, the midway point corresponds to #t=.5. Replacing "t" with "#t-.5" shifts the inflection point so that it occurs at #t=.5. A similar effect can be obtained by instead changing #t to go from -.5 to .5, but then the other functions may need to be updated as well. You also may
C: This is a normalization factor. Since Arctan has natural asymptotic limits of +/- 180deg, dividing by 180deg makes those limits +/- 1 instead.
D: This is also a normalization factor, but it's dependant on C. In this case, setting C=8 yields a maximum value of approximately .42 (after normalization) instead of .5. And .5/.42=1.19. C and D could be combined, but it seems easier to separate them out so the overall length (E) can be changed independently. D changes inversely with C.
E: This is how long you want the spring to be end to end. In this case it was 50mm.
F: This parameter is optional and was not used in the original Z function. But if you would like Z=0 to correspond to the start or stop of the spring instead of its center, set F=+/- E/2.