Creating repeated pattern with perpendicular intersecting planes

Hi,

I am currently trying to generate and create a modular puzzle made out of two or three diffrent pieces. The individual pieces are flat, supposed to be made of plywood or similar in the final construction. The system is laser cut with slits in the plane. This means that plane to plane will be perpendicular at all times.

In the uploaded picture it might be easier to understand what I am describing as I don’t know myself how to describe it.

What I would like to know is if there is a good way to do this process in grasshopper, so that I don’t need to connect them manually in rhino?

Best regards
Bartolomeus

2 Likes

Cutting the slits would be easy, as there’s a component for that, however assembling a set of pieces is probably a lot harder. Given how many different possible assemblies there are, how do you imagine choosing or specifying one of them? Do you have a notation which specifies piece identifiers and slit indices you want to convert into an actual model? Do you want to create random assemblies? Or…?

2 Likes

Hi David,

Thank you for the quick response!

Hmm… I see what you mean, I honestly hadn’t thought about that.

But let’s say for the sake of moving the question forward, I want to choose one direction (axis) with one type of piece and just array that piece in the chosen direction. However, doing this while keeping the alignment of the slits consistent.

This would mean that every other piece is rotated 90 degrees.

Hope I have explained myself.

Best regards

1 Like

Pff, this got really complicated really fast. By far the hardest bit is specifying the total assembly.
I got something finally working, but it’s bound to have bugs. It’s also pretty hacky.

The idea is you first create a bunch of puzzle pieces. A piece contains a closed, planar outline and some number of slit lines. they must go from the boundary to the interior. Once you have a collection of pieces there’s another script which assembles them according to a pattern:

puzzle.gh (17.3 KB)

The assembly notation is as follows:

You start off with the name of the central piece, in this case A. The piece is then followed by a comma-separated and bracket-delineated list of attached pieces: A(xxx, xxx, ..., xxx).

Each xxx contains the index of the slit of the piece it is attached to, then a colon, then its own name and the index of its own slit. So for example A(1:B2) means: "Start with a piece of type A, then attach a piece of type B such that the third slit of the B piece is connected with the second slit of the A piece." Slit indices start at zero.

You are allowed to append pieces to those pieces by providing another bracket-delineated, comma separated list.

4 Likes

Wow!

What a comittment! Here I was thinking it would be a simple thing to do with such an advanced program as grasshopper, boy was I wrong…

I think I understand the basics in how you did it, and will try to accomplish something in that manner myself.
Would like to state that I am still extremely green to greassopper, but I am really looking forward to learning it better!

Thank you again David!

It’s a complicated problem, but mostly because of the notation parsing. The actual transformation code is just a few lines. The idea is:

Given an existing piece S_0 with a specified slit line L_0, attach another piece S_1 with a specified slit L_1 such that L_0 and L_1 are coincident and the normal vectors of the planes of S_0 and S_1 are perpendicular. This in fact still leaves two possible solutions 180 degrees apart, so it’s not even fully specific.

I used the Orient transformation which has two planes as the input. The first plane P_{source} has the origin point at the beginning of L_1, an x-axis parallel to L_1 and a y-axis parallel to the normal of S_1.

The second plane P_{target} is slightly different, it is centred on the end of L_0, it’s x-axis is anti-parallel to L_0 and it’s z-axis is parallel to the normal of S_0.

Once you have P_{source} and P_{target} you can set up your orientation transform and apply it in total to the second piece.

1 Like

Hello, which component could be used for slits?