Is Kangaroo able to simulate the deformation of a initially curved shape, like a hook? The current setting always makes the curved shape to be straight at the beginning

Hi all Kangaroo users,

I find that the definiation of the line in Kangaroo (e.g. length) always tries to make the line to be straight and keep it. Thus it is not possible to simulate a initially curved shape, like a hook. How can I simulate a hook deformation, then return to its original shpe?


If you want to simulate a curve which keeps its shape, you need to discretize it into segments and maintain the angle between adjacent segments. You can do this either with the Angle goal, or with the Rod component (which creates length and angle goals, but avoids you having to do the list shifting and trimming).
hook (10.1 KB)

Note that this just preserves an angle, so in 3d it would still be free to twist. If you have something in 3d you might need to use the beam goal instead.

1 Like

Thank you so much, Daniel, for your quick reply! That’s a very nice example.

Yes you are right, I am trying to do something in 3d. Do you have any suggestion or simple example on beam goal?

Thanks again!

I tried your example just now. I fixed the two ends and deformed the hook by mouse. The hood can recoil but there still is some “permanent deformation”. Should I increase the parameter in strengthes?


Because it is only the 3d angle being maintained, if the angles are small they can sometimes ‘pop through’, and since they aren’t being measured in a particular plane, this ‘reversed’ angle is an equally valid solution for the goal. That’s what you’re seeing as ‘permanent deformation’.
If you want to keep a whole curve rigid, you can also use ‘RigidPointSet’.
What is the intended application?

Thank you for your reply, Daniel!

Now I understand. However, I need the hook to be deform thus the ‘RigidPointSet’ is not suitable. I am expecting more improvement of Kangaroo in the next version!

You don’t need to wait for the next version for this - you can do it now with the beam component. I just didn’t want to jump straight to that before knowing what you want to do with it, as it is a little more complex to set up. Anyway, here’s an example: (19.8 KB)

Hi Daniel, that’s exactly what I want!
Thank you so much again, and I love Kangaroo!!

1 Like

Hi Daniel,

Could you please rewrite the C# script in the GH file to Python script? I can’t edit the script because I know nothing about C#. Thank you so much!

Do you mean the bit at the end making the mesh from the planes?
It’s not even essential to use a script at all here. I think I did it this way at the time because the meshes are a little faster, but you can also just make rectangles and loft them like this: (11.3 KB)

1 Like

Thank you, Daniel, that’s great!

Hi Daniel,
Sorry to bother you again. If I apply it to multiple curves connected, the last step shows wrong shapes. It seems the “orient” step has problems of datatree, however, I can’t handle the datatree issues. Could you please have a check? (16.8 KB)

This can be solved by unflattening that branch of the output: (11.6 KB)

I think this is actually something I should improve in Kangaroo though - it should ideally preserve even multi-level trees in the output without needing to unflatten with an extra component like this.

1 Like

Thank you again, Daniel!
Can’t wait for the next version of Kangaroo!