Kangaroo: folding a polyhedra

Hi,

I am trying to fold an unfolded mesh to form a polyhedra. I manage to fold the central part. However, I want to snap the folding points to the top and bottom polygon of polyhedra (if it is possible to keep top and bottom polygons as flat). How can I make the points to snap to intended polygonal face? (Keep the points connected shown with blue lines in the image while folding the pattern)

Thanks in advance.

What is the intended output here?
It looks like you start from the assembled 3d shape, unroll it, and then you want to reverse that process? Is it to show the folding process as an animation?

1 Like

I modified the code diving the unfolded pattern into three pieces. Then, trying to roll over the central part around the top and bottom layer as a second simulation by using onPlane components and Snap components of Kangaroo. However, I cannot manage to snap the points to rotated bottom and top parts of polyhedron.

folding polyhedra_question2a.gh (38.0 KB)

I want to do a form-finding simulation for paper-folding. So, I want to simulate the final form according to forces to fold as mountain and valley.

How does the final form look?

Like this. The three-way polygons at the top and bottom. While central part is folded in between.

I assume this is a polysurface. Have you already unjoined the edges and unrolled that?

Yes, polyhedra is also within the code. Brep unfolding to a crease pattern. But I want to simulate folding behaviour ln reverse for a given crease pattern. Because of that I used hinges. But I cannot achieve the final shape as a result of folding of hinges.

.

In this case, a file with no inputs is useless.

1 Like

folding polyhedra_question2ab.gh (90.2 KB)

Looks like the crane stuff is not needed for the unrolling / folding simulation…

I have tried both of them. Crane does not work as well. Kangaroo is my first preference.

1 Like

In my opinion, you could do something like this:

  1. start with a brep face that’s already in the plane that you want the final unrolled result to be in, here the XY-plane and thus bottom face
  2. chose one of its edges - let’s call it E -, and look for the next face that is not the current one but shares the same edge E with it
  3. look for the angle between the current and next face (vector angle between their normals) and rotate all remaining faces around edge E by the same angle so that the next face lies flat in the same plane as the initial face
  4. chose the next edge E’ on the just unrolled face and repeat steps 1 through 4, until all faces are unrolled

Of course this might be a little oversimplified, you might for instance have to check if the newly unrolled face intersects any other, already unrolled faces and backtrack if that’s the case, but it might be a good start and will give you full control over the process.

How to fold/unfold a carton box in Grasshopper? - Grasshopper - McNeel Forum

I need scripting then, right? However, I do not know the scripting in grasshopper :confused:

Do I need to use Kangaroo or not? Is it possible to do that with standart components within grasshopper?

Hm, probably not. What I proposed is possibly easiest with some scripting (Python or C#), but should also be feasible with vanilla Grasshopper components that is if you need that amount of control and want to invest the time.
It depends on what you want to achieve.

There’s also the Ivy plugin. Have you already tried that?

1 Like

No, I haven’t yet. Do you know any example files?

It is really disappointing that whenever I have tried to use Kangaroo, I cannot improvise sth that I want. It is really limited in terms of adaptability of the components. Just saying..

I did this with kangaroo some time ago. The definition is a bit of a mess and not ready for sharing.

4 Likes

Check the link I posted above. The author has posted some examples along with documentation about plug-in there. I haven’t it used it thus far, but I know that it’s about unrolling.

Kangaroo takes some getting used to and sure has certain limitations as does Grasshopper. If you want more control and flexibility, you need to learn programming, but that’s a deep, deep rabbit hole. :slight_smile:

1 Like