Grasshopper

algorithmic modeling for Rhino

Hey yall,

I build guitars, and part of the process for acoustics is steaming and bending the wood for the sides in a form. The problem is that once the wood is taken out of the form there is some "springback" where the wood relaxes a bit. I am trying to create a definition which takes the original and final shape, and overbends it to compensate for the springback.

Youtuber Matthias Wandel solved this by approximating the curve as a series of arcs, and making their radius tighter by 20%. Here is the video, if anyone is interested: https://youtu.be/1qrQn84kVIk?t=284

I tried shattering the curve, then using the start and endpoints, and tangents to create arcs. This actually worked pretty well for approximating the curve as arcs. Some googling has also shown that DR has a script/definition for biarc fitting, and that people have also elsewhere created ways of dividing curves based on curvature. I will consider implementing these if need be, but for now the bottle neck is in bending the arcs in a way that keeps them connected (or puts them back together), preserves the length, etc.

My attempts have ended up creating disjointed arcs, which are just smaller basically. I manually move them end to end and it is just a smaller version of the original curve.

Most of my ideas on how to do this, I'm not sure of how to implement, but I would think would involve recursion.

Is there a way to create an arc with length and radius? I could just keep the lengths the same but change the radius, creating each new arc starting tangent with the end of the last arc?

Thanks for the help!

Views: 1590

Replies to This Discussion

Is there a way to create an arc with length and radius? I could just keep the lengths the same but change the radius, creating each new arc starting tangent with the end of the last arc?

Not intrinsically, but the maths isn't too difficult. The total length of an arc is a*2*pi*radius (where a is the reduction factor from a full circle), so if you shrink the radius by some factor (say 0.8), then you must increase the angle domain by the inverse of that factor (i.e. 1.0/0.8 = 1.25). It is remarkably cumbersome to get the radius value of an existing arc, but I guess you can just convert it to a circle, measure its total length and divide by 2*pi...

Most of my ideas on how to do this, I'm not sure of how to implement, but I would think would involve recursion.

You can achieve this using the Mass Addition component. Step one is to set up the move vectors between all consecutive arcs, invert them and then use the partial result of the mass addition. There's some Shortest List management involved as well, but the attached file hopefully shows you how.

Attachments:

Oh I just realised this won't do, because it doesn't change the rotation of the arcs. Each arc gets tighter and will have a larger angle, so each subsequent arc must also be rotated by that deviation.

I think that can also be done with some intricate mass addition slight of hand, probably requiring you to create the differences in end-tangent of each arc prior to and after tightening, then measuring the angles between those tangent differences, then mass adding those angles together.

It's beginning to sound awfully complicated now...

I've got a head-ache so I took a shortcut. The C# component in the attached file will tighten the radii of a list of arcs by a given factor, adjust their domains so the lengths remain the same and then it will chain them.

Attachments:

Lol, David, that's tight, yo! Thank you so much, it works great and will be very helpful.

When I first read through your replies most of it was greek to me, but I spent last night reading, experimenting, learning, and am understanding a lot more of it now. I've read a lot of the component descriptions, but it never seems to click until I see the component in action in a variety of ways.

One thing I still don't understand is this:

“It is remarkably cumbersome to get the radius value of an existing arc, but I guess you can just convert it to a circle, measure its total length and divide by 2*pi...”

Aren't radius and angle domain (and base plane) the defining features of an arc? The deconstruct arc component gives radius as an output.

"I think that can also be done with some intricate mass addition slight of hand, probably requiring you to create the differences in end-tangent of each arc prior to and after tightening, then measuring the angles between those tangent differences, then mass adding those angles together."

I might give this a go as an exercise. Since the angle changes proportionally to the tightening factor, why wouldn't each arc just need the same amount of additional rotation from the previous arc?

I really need to learn to code. I've seen you, elsewhere, say something along the lines of "imagine how much more powerful you'd be if you could code!" There's something really intuitive about the graphical flow of grasshopper though. Love it. Thanks so much for everything you do. You're a legend!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service