Grid with 2 rectangles


I’m slowly learning grasshopper and I’m trying different things.

At the moment I have achieved one of my own goals.

I was just wondering if I shouldn’t have made this more efficient or cleaner?

My goal with this file is a grid where I can set the number of columns and rows in each cell will be 2 rectangles that are smaller than the grid with a set interval.

By testing different values as imput this model turns out to get the result I want.

My current question is still. Could this have been done in a different, better/cleaner way?
grid with 2 (22.5 KB)

If you want offset cells use offset or scale

grid with 2 (16.8 KB)

i probebly cant controle the individual rectangles sizes annymore can i?
thats one of the things i wanted.
but thank you for your example. ill investigate how you built it and learn as i go along.

like this?
grid with 2 (18.2 KB)

  • play with range values/graphs to offset in vs out

it depends…anything’s possible…can you show an actual sketch of what you intend to achieve? An image tends to say more :slight_smile:

Good luck

Yes you can; plug many sliders with the same number of squares or use Genepool with Genepool controller (Heteroptera addon) to generate slider count = number of squares
double click on Genepool controller if you want rondomize sizes

grid with 2 (21.6 KB)

Wow very well done. Let me download the file and see if i at least understand what you did.

As i stated before the objective was for me to learn, i started with a grid where i could control the colons and rows and the size of the grid. Then i added more and more stuff to it.

The last thing i added was the ability to impute all the dimensions of anything to be able to control it.

I made it one step harder for me each time I achieved a goal.

Let me first find out if I understand what you guys even did. And maybe I’ll figure out why you made it the way you did.

There are probably multiple ways to get the same result, so this really is a learning experience for me.

if you guys know of a other good way to learn grasshoper do tell. im mainly using rhino to draw 2D and not 3D, and i wil be usign grasshopper for the same reasons.

As for why i decided to do this as a learning project, a few years ago i made a board for a board game.

But i did draw it totally by hand.

When i got introduced to grasshopper i was wondering if i ever wanted another board again if i could automate it.

It seemed like a nice learning project for grasshopper to me, and at first did not seem too difficult.

Here will share the file of my original bord bord.3dm (869.5 KB)

The file was made to be laze cut and engraved. Why the repeating lines that’s to get more thickness of a line. I cheat a little when i use the laser. I don’t use the engrave setting but the cut setting with a higher speed. On the board that saved me hours of machine use but when cutting, the width of a line are the width of the laser and i wanted thicker lines so i tight why not have multiple lines close to each other…

I already have the product of this drawing, but i decided to use this one to learn grasshopper with. And it could be even useful for me in the future if i ever decide i want to make a board again.