Create boxes in volume

How can i subdivide this volume into boxes representing appartments ? The boxes should follow the geometry of the volume. I tried twisted boxes from Pufferfish, but can’t find the answer… I have a complicated solution wich is creating a mesh and usig the mesh panels on the surface as a starting point and connect every corner of those surface mesh panelswith the opposite side by using horizontal lines and afterwards vertical lines.

1 Like

@DanielPiker ,

A challenge for you :wink:

BR

I’d suggest also trying Galapagos.
Using surface mesh I think is not a good idea

But you need to provide the boxes at least.
What sizes they are?
How much of each size you want to fit in there?

I have no answer for the sizes. It can be abstract. I want a parameter to try a lot of boxes and less boxes. Pufferfish has good tools but always on the exterior and can’t find an answer for the inside of a volume. I think this question could help a lot of architects. And yes the mesh idea is my final solution if i don’t find something else.

Contour the shape to create floors, create rooms on each floor, then use the shape to trim the rooms.

1 Like

How will you do this ? To make an algorithm you can try to solve it by hand and by little step.
Like said by Joseph, make the levels, then the stairs elevator, then the corridor, then subdivide the remaining surface.
You’ll find many discussions on how to subdivide a shape.

Hey,

I did it with Solid differene and box array, but i have an issue. The Solid difference is not working very well ? Looks like a bug …


unnamed.gh (14.0 KB)

Laurent,

I did like what Joseph suggested; Make shape, make Boxes and make a boolean difference to extract the shape with boxes in it, but it is not working very well ? I gave the GH file in link above.

You didn’t internalize your geometry.
missing

You didn’t post your Rhino file. Right-click the Crv and Brep params and choose “Internalize” to save the geometry in the GH file.

1 Like

Here the INternalized file. You can see that the Solid difference is leaving some boxes arround, why ?
unnamed.gh (17.6 KB)

How about this?


boxes_in_volume_2022Oct7c.gh (13.7 KB)

Good one, but the Solid difference should have worked, why didn’t it you think ? Your mthod is expert level. Could you explain me what the MASS MULTIPLICATION is for ? And the shift list ?

I’m not so sure about that, partly because your shell shape wasn’t a solid (“Closed Brep”), it was open top and bottom. That’s why I added Cap (Cap Holes), but it still failed. I don’t waste time wondering why, I just try something different.

Experienced, not expert.
Shift Paths, not Shift List - The best way to see what it does, or understand data trees from any component really, is to connect temporary text panels before and after.

See what it did? {0;0;0;3;0} and {0;0;0;3;1} are combined to the {0;0;0;3} branch with two items.
{0;0;0;5;0}, {0;0;0;5;1} and {0;0;0;5;2} are combined to the {0;0;0;5} branch with three items. Etc.

To understand MM (Mass Multiplication) you have to again examine the data trees, before and after.

Remember that SplitMul (Split Brep Multiple) cut all the boxes in two that touch the shell shape. For each vertex of the fragments (and whole boxes), BrepInc (Point In Brep) returns ‘True’ if the point is inside the shell or ‘False’ if not. MM multiplies all the items in each branch together, so if any one of them is zero, the result will be ‘0’ (outside), otherwise ‘1’ (inside).

The net result of all those steps is a cull pattern that matches the data tree from SplitMul, leaving only the box fragments (and whole boxes) that are inside the shell and ignoring those outside.

Whew! That takes a long time to explain but matching data tree patterns becomes second nature after awhile. It’s the only way to succeed at Grasshopper.

1 Like

Here’s something very simple that works. I tried this before but must have been confused by the orange component, warning/error message and all the clutter on the screen from other components.


boxes_in_volume_2022Oct7d.gh (9.4 KB)

P.S. An interesting culling affect based on the ‘min volume’ slider (blue group):


boxes_in_volume_2022Oct7e.gh (11.7 KB)

P.P.S. Co-planar faces can make this a little confusing but there are many games that can be played with these models. Balconies!


boxes_in_volume_2022Oct7f.gh (16.7 KB)

Another play, starting with yesterday’s version ‘7d’ and selecting only planar faces while ignoring holes:


boxes_in_volume_2022Oct8a.gh (21.2 KB)

solid difference worked very fine in my Rhino (7.22)
here are some suggestions:

1: Make sure your Rhino 7 is up to date. [No crack]
2: Try to avoid 3rd party plugins no matter how good or convenient they are, before you can solve simple problems like this easily with original GH components.

Solid difference on A and B means something in A but not in B.
I do not recommend difference here.
Here you should use Solid Intersection because it actually make sense since you want the apartment both in the surface and in the box.

@Joseph_Oster
The orange component means that A and B do not intersect. This is totally fine. Some boxes are outside the surface.

SInt (intersection) instead of SDiff (difference) was the first thing I tried since it makes more sense to me. I misinterpreted the orange color and error message as total failure instead of failure only on the boxes outside of the shell. That set me off on the path of using SplitMul (Split Brep Multiple) to cut and trim the boxes, but that was misguided and unnecessary.

Sloppy of me, I know better. Success was obscured by not disabling preview on other components.

1 Like

yes,sometime a component will be red if partial result is invalid, but some are orange, and some are even normal color.