I’m working on a steel bending simulation.
I hit a snag using this technique:
youtube vid: https://youtu.be/hKeYG6DJwV0?si=SmKhE0IaWywhM9nD&t=328
If you think about it, when you bend a wire, the "direction’ vector is always changing. In the above tutorial, it is fixed to a global coordinate. When I tried to feed a vector that is moving into the Line Direction goal, the sim failed, i.e. it never resolves. Is this just a computational limitation, or is there something I’m missing?
I’m trying to simulate something like the below illustration where a rod is captured within two rigid tubes. As this hopefully shows, the “direction” vector both rotates and translates. Any help understanding this will be great.
Thank you.
I moved your topic into the Grasshopper Kangaroo category.
And it might help to post your files…
That’s great. Thank you. I’m in the tunnel right now. Maybe when I’m out the other side I’ll put up my new patch. With new problems… Thanks again.
I have managed to solve the problem above, not that I could tell you how, exactly…
Now, I cannot get the end point direction bias to effect the gravity.
In real life the curve being bent will rise toward its apex because it is the edge of a surface. I’ve already gone crazy trying to simulate this as a surface. I got pretty far but it wasn’t precise enough. so I want to try doing it with edge lines and then rebuild the surface out of those.
My assumption is that I can use an inverse load of the rod and, if the direction bias works, it will progressively lift at each segment further from the anchor points, maxing at the apex. No?
Is there a way to create a progressive load, where each segment away from the moving anchors gets heavier?
File attached. The simulation is in the blue group. All the other stuff is design work that shouldn’t pertain to the questions.
Thank you!
Cut and Bent 2.gh (83.8 KB)
This definition uses the Move to Point and round to Decimals components from Pufferfish.
I don’t use Pufferfish and I don’t really understand why Pufferfish needs a special component which does pretty much the same as Orient?
Round to decimals is also pretty easy but ok, nevermind…
I think you can do the direction goal like this…
For the solver I generally suggest plugging show goals into a separate branch in an entwine component. It allows you to retrieve results after the solver more easily.
Cut and Bent 2.gh (79.5 KB)
1 Like
Cool! Thank you.
Those components are just shortcuts. But that’s what most plug-ins are, no? The mirror functions and multi-tweening are pretty cool. I’m using the mirror a lot in this patch. I don’t know their impact on computational load.
Your solution looks more direct than mine, which is great. But I’m still struggling with the “weight” issue. Do you have any ideas about that?
Imagine you were bending a wire and gave each hand a little twist. If you twisted inward or outward, the apex of the bend would either go up a little or down a little. That is roughly what is happening in the physical model. I need to simulate it in order to iterate more rigorously and extract precise measurements to scale it up.
I faked this effect by using the “bend” function, but I’m sure that won’t work for the other parts. It really seems like something Kangaroo should do. No?
Cheers,
@martinsiegrist Your definition is working really well. I just needed to make the power on the weight increadibly low! Thanks again.
1 Like