Element in Inside Room

The method in my animation can work to populate content into with any shape built from lines. There are other options for non-linear shapes too, and you can allow individual shape rotations and adjustments as desired. However I don’t have animations handy for those.

All of this is private code which I cannot share, but I can say what you’re after is doable.

@Alien only I try to learn :smiley: for different scenarios

1 Like

Thank @jacob.small . I will try to find solution. Maybe I can use in Generative Design example dynamo codes to understand it’s logic.

I’m on vacation next two weeks so I won’t be able to provide much, but perhaps when I get back I can look to put a sample or toolset together…

1 Like

Revit_ruzFFP5HEU

So decided it’d be fun. :smiley:

Only checks squares aligned to the XY axis though. Could easily scale it up to check rotations too (but as @sovitek will attest, I’m too lazy :rofl: )

2 Likes

soo cool :grin: but still say you are lazy :rofl:

1 Like

I’m not denying it. :rofl:

Sooo… @jacob.small messaged me and made me feel guilty I’d not done more. :stuck_out_tongue:

So I added some rotations…

And it dawned on me that you’d also have to check the square doesn’t go round any objects smaller than it is (see image)…

So you’d need to add an extra check to see if the item is inside the rectangle.

I’d do it by a quick intersect test… which I really AM too lazy to do right now.

#GuiltFree. :laughing:

Someone else feel free to finish it… Maybe @yaseminV2XL5 can do this.

The ‘quick fix’ on this is to use surfaces instead of curves. Surface for the object, surface for the available space. If the sum of the area of the intersection of the object surface with the available space surface is the same as the sum of the area of the object surface, you’re all set.

1 Like

Thanks to @Alien and @jacob.small , I used the @Alien graph. Finally, as @jacob.small said, I took the points that can be 1 square meter in the area. I want to place points in the x and y planes in equal intervals according to their length in the placement areas inside many rooms. But I couldn’t succeed. Any ideas?


  1. Get the bounding box of the surface to populate.
  2. Get the vector from the min point to the max point
  3. Get the X and Y components of that vector.
  4. Build a range for the number of X and Y steps (0..X; 0..Y; in design script).
  5. Find the mid point of the surface using a Surface.PointAtParameter(0.5,0.5)
  6. Translate that point using cross product lacing of the X and Y ranges.
  7. Invert the X and Y ranges (multiply by -1) and translate the middle point by the cross product of the inversed ranges.
  8. Join the lists of translated lists of points together (List.Join) and remove the structure (List.Flatten)
  9. Prune any duplicate points using a Point.PruneDuplicates node

Hello. When I take one item of the list, I get regular points. But when I take all items, I get irregular points. How can I fix this? Thanks