Get elements inside an area

If you look at the picture, i have made a filled region. I want to make a script there can figure out which elements there are inside the area. Which means, in this example, i want a list with the objected with crosses on them.
I know how i can do something with boundingbox, but that gets all elements which the box intersect.

Any ideas??


One possible approach could be:

  • get the volume of the Area volume with Area.Solid from Rhythm package.
  • get location of elements and check intersection with the solid, remove the ones that are not intersecting.
  • check intersection with faces of the solid (explode the solid), remove the one that are intersecting.

The remaining elements should be the one completely inside the area solid.


Can you show me a simple example.:slightly_smiling_face:

Solid union of area volume with walls will produce solids that will have same parameters when walls are completely within that Volume. Otherwise the parameters will differ and you can sort them out.


I like this challenge :slight_smile:

Here’s my version…

I’m driving it off what you actually see in the view… ie. the cut surface of the wall… (incase you have a wall which is inside in this view but not entirely inside the area solid, perhaps it spans several levels)…

This option might be worse if you only want the ones who’s volume IS entirely in the area solid :smiley:

Slightly refined…

WallCutByAreaRegion.dyn (19.7 KB)

1 Like

As i understand your script, it’s works in af plan view, i want something 3D. :slight_smile:

I want something, where i make a reference level belov the hole building. And in that level i make, some way or another, some filled region too symbolise locations. Then i think of some way to make af solid, there is a lot higher then the building. And everything inside, and only inside the solid get sorted out. And i mean everything, floors, ceilings, walls, furniture, casework and ect. :sweat_smile:

So far i have used filled region to mark an area. but i can’t get to make a solid or anything else there have 3 dimensions. I imagined i could copied the boundary lines up and somehow make a solid that way, but can’t figure out how.


So you will make your level, then a plan view to draw your filled region, then you get it’s geometry and the first one of those is a surface, you can use Extrude As Solid and go as high as you like… then use @lucamanzoni’s graph :slight_smile:

Hope that helps,


I have tried to use your idea with Extrude As Solid, but it comes up with a warning. Do you know why??

You want Surface Extrude As Solid, not Curve :slight_smile:

Surface Thicken maybe?

It worked with the new node. :slight_smile:
But the scripted don’t work, it can’t handle floors, and i can’t get it to work with more then one area/filled region location.

So now you have your solid you can plug it into @lucamanzoni’s graph.

If you can’t get that working post a shot of your graph.

Once that’s going it’s just a matter of setting @levels to make sure the right solids are checked against each other.

Something to bare in mind is the sheer RAM requirements of checking completely populated buildings, you might prefer to run them individually…



There is 2 pictures.

  1. Here you see the problem with the floor.

  2. Here is there no floors selected, and the first intersection works.
    But with the second intersection it’s don’t work. I have marked the floor line there is outside the solid. But it still say it’s inside.

If all you want is to check if the center point is inside some area, you can find center points using the bounding box’s min and max points.

Something like:

x = (max.X + min.X) / 2;
y = (max.Y + min.Y) / 2;
z = (max.Z + min.Z) / 2;
centerpoint = Point.ByCoordinates(x, y, z);

Should work for any object and easier on the processing.

Kenny’s idea is good, there’s also a handy node in Zhukoven…


1 Like

@1065553 You are right, you don’t get location for floors, so probably you need to remove floors from your selection and try something different. I didn’t consider floors because they are shared between areas.

For the second point you are taking the in output of the last node, but you need the out one (check my graph), what you want is the elements that are not intersecting the faces.

@kennyb6 the problem is that OP wanted to remove walls that are intersecting the area volume. If you only take center points you can’t find those walls partially outside the box. In my method I proposed GetLocation because you get points for family instances like windows and doors, and lines for walls, and then you can check intersection between those lines and the box faces. But true, it doesn’t work for floors.

From what I understood in the first picture, he didn’t want the walls that were at least 50% outside or so (only the Xs, not the Os). In that case, the center point would be a good compromise. Alternatively, you could do both, where if Get Location returns a null, use the center point.

Ok, here’s my go, it’s not very efficient, but it’s doing the job.

If we had several filled regions, we’d need to fix the Levels…

ElementsInsideRegion.dyn (30.9 KB)

Edit: I think it would work best in practice to use an Active View, then you could make sure that view was showing everything you wanted to clash, it would avoid doing everything in the entire model…

Here is my version.
I can only handle one filled region at the time, but it gets all the element i need.
If you have some ideas to how to include multiple filled regions in this script, i would love to see them.

CCS Placerings-ID.dyn (56.3 KB) Scripted include some other things, but if you only look at the picture you see which nodes there is relevant to you.

1 Like