Simulate a folded box from unwrapped layout

Hello,
I have a file of an unwrapped cardboard box that I wish to fold and make 3D model with GH.
frk154287.dwg (12.8 KB)

Any ideas on how to do it?
Cheers.

No easy magic that I know of. I would start like this, splitting the cardboard into five pieces.


cardboard_2023Jun23a.gh (28.9 KB)

Then rotate four sides 90 degrees around the appropriate line.
Cut the long sides (green and yellow) by the 4 lines that are 43.46 units long and rotate the ends 45 degrees.
Cut the rotated ends by the 4 lines that are 45.18 units long and rotate them another 45 degrees.

But now that I look more closely, the blue and red ends are not square so those are not 45 degree angles, so it isn’t as easy as it looks. :wink:

1 Like

Yea. Not an easy fix… l tried to use Crane / Kangaroo hinge, but I couldn’t make it work. I guess I missed something there… any help on that side maybe?

Fix? What are we fixing? I would never call this easy. (except in jest, as I did)

Hi Joseph, Thanks for your time and your reply. As you pointed out- there are no 90 degrees nor 45 degrees. it is a package design that can be different anytime and I need to have a 3d of the volume of it…
I replied in the other post in detail…

The trouble with DUPLICATE THREADS is that replies get scattered. I have no interest in following your lead in the other thread, where you posted no GH code to match your image and description. What do you expect people to do with only words and images?

I did look again at the code I posted above and found that the four lines labeled “43.46” do not touch the outer boundary. They are slightly short so don’t work to split the surface. I added this code to extend them slightly, which works.


cardboard_2023Jun25a.gh (31.8 KB)

Oh well, that will break this code so I won’t pursue this any further.

Hi Joseph. this is what I have so far. Any idea how to find the angle of the fold? Or simulate the rotation, and stop it once the surfaces touch each other, without Galapagos… ?
Cheers.
forum fold.gh (21.7 KB)