How can I move cabinet next to each other depending on the width?

Hi,

This is my first time posting.

I am using internalize data (Cabinets) I want to be able to bake the second cabinet and move it to the right the same width of the previous cabinet.

Right now, when I bake the second one it bakes over the first one.

you should first move the second cabinet to the right by an amount equal to the width of the first one, then bake it

Inno thank you for the quick response.

How I do create a true to do it? Since I am using internalized data.

Put a bounding box around the data, measure the width of the box, move the data by that amount.


(Not sure where that Size component is from)

mover kool.gh (201.3 KB)

1 Like

I am trying this.

This works, thank you. I figure out how to do it with groups.

Now How I can do if I have multiples cabinets that are different. How can I create a true to move them based on the start position and previous cabinets width?

Put a single bounding box around multiple cabinets and it’s the same process. Set the bounding box to union box so that you only get one box covering multiple objects.

78

I try this.

It’s a password-protected cluster.

Best way to get dimensions of a bounding box, IMHO, is deconstructing its diagonal vector.


mover kool_2024Jul29a.gh (194.7 KB)

1 Like

Joseph,

Thank you for your answer, I will try this too.

Virtually is working but I am having few challenges that I am trying to find a solution.

Overall

On bold are my first goals.

  • I want to be able to create a wall and start baking cabinets uppers and lowers from left to right.
  • All the cabinets are internalized objects with each part/material with a layer (human).
  • The counter-top will be coded in GH.
  • Add dimensions
  • Create Shop Drawings to export on PDF.

You might want to study this code:

The first thing it does is gather the boxes and center them:

I would replace the Dim component with deconstructing the bounding boxes’ diagonal vectors, as noted above.

Internals of the MoveD cluster are explained in that thread but as I recall (and as noted in the post), that cluster was created in this earlier thread to move polyhedra examples apart:

1 Like

Joshep,

This one work too. The only challenge that I am approaching is when I have different parts, they don’t move equally. The hardware bounding box is shifted.

I will see this.

You must post code when you ask for help :bangbang:

I see only one cabinet with various parts in that file. :man_shrugging:

1 Like

So far, I have only internalized three of the cabinets. I want to make sure I do understand what I have to do before adding all of them.

I’m not here for a long conversation or to play twenty questions. Whether you know it or not, the main question in this thread has been answered.

1 Like

Me neither. :handshake:

Thank you.

OK, I simplified this to focus on moving the cabinets. I am surprised to have the Human plugin installed so I can see Create/Modify Layers and CreateAttributes and Bake Geometry components you are using. But I stripped them out of this version of the code. Not sure where to add them back in? Maybe some before I grouped them but bake afterwards?

The purple groups Group geometry for each cabinet, twice… Hope you see why?


CABINETS_2024Jul29a.gh (3.6 MB) DEPRECATED, replaced by version ‘c’ below.

Merge combines the groups (one per cabinet) into a single list. The white group centers the list of cabinets on X, ignoring Y and Z, because that’s what my MoveD cluster expects.

And “Bob’s your uncle” (done!).

The output of the green group needs Ungroup, twice… (not included)

P.S. Oops, I see a flaw:
CABINETS_2024Jul29a3

Fixed, internal to MoveD cluster, as mentioned before.
CABINETS_2024Jul29b.gh (3.6 MB) DEPRECATED, replaced by version ‘c’ below.

Explained in P.S. here: