Merging and Resizing Modules in a grid

Hi everyone!

I’m trying to create a generative pattern for filling a cabinet drawer with containers. So far, I’ve only managed to make the containers themselves (don’t judge too harshly — I was doing it by intuition and I think it could be done much more efficiently).

But I really don’t understand how to generate the placement of these containers inside the drawer.
Also, is it possible to make it so that elements can be changed and the others adjust automatically?

For example: Two 1×1 modules are next to each other, and I want to merge them so they become a single 1×2 element.

I really hope you can help — I’ve already been banging my head against this for a while :face_with_spiral_eyes:

boxes.gh (21.8 KB)

thats how the boxes looks right now

So i tried to do it with List Item → Cull Index → Merge

but that looks like an insanity and not a scalable thing to pick indexes individualy by hand

Is this a rule that must apply “always”?


You should solve this problem with topology.
Each internal line (or edge) is normally connected to two elements.
Iterate:

  • evaluate every element and determine its area and shape ratio (1=square, 2=rectangle, 3=long rectangle)
  • evaluate every line/edge and when you find the first edge that is shared between 2 ratio=1 elements, delete that edge. Restart iteration.
    Very raw idea. This can be done with anemone plugin or through scripting like c#.

Thank you for reply!

The problem is that its not a rule to apply always…

Its more about controlled variations of grid/area filling
Not just randomly distributed/packed 2-3 typologies in a boundary, but the abbility to control each item and change it

Looked almost through all forum, but didnt find controlled solution to this, mostly all of them are a random distribution without possibility to change specific “cell”

The closest thing to this is a solution in Blender by using nodes from Joe Bowers

Sorry for IG link — but its the best showreel of what it does
https://www.instagram.com/reel/C2lbMAxpi8e/?igsh=MTRjY3RxYXQ2N3oyeg==

in this example you “destroyed” a 1x2 element to create a 3x1 element…

I do not understand.
Do you want an “automatic” generation of modules or a manual “user-assisted” generation of modules?

I would say user-assisted

sorry for my english btw, trying my best)

seems like im starting to get it

so i should have a 1x1 grid
and by usind points attractor → selecting cells to merge?

Try this:


user-assisted modules.gh (14.5 KB)
Bake the curves and then reference them all in the orange parameter.
Then delete the internal curves you don’t want.

Added a small c# component to ensure curves are counter-clockwise so the offset direction is coherent.
You can have “half-module” if you move the internal lines.

Legend!

I would say thats more than enough for my task

Thank you very much

BTW how would you suggest to build boxes inside this rectangles?
Have sepparate builded box with plane/curve input?

user-assisted modules 2.gh (24.7 KB)


If you prefer to plan vertically you can replace the 3 “XY Plane” components with “XZ Plane” and the 2 “Unit Z” vectors for the extrusions should become negative Y vectors and Cull Patterns should use Y…