Find the closest points to an element

Hi all, Good morning

Basically I am trying to find the closest points surrounded to an element. I have list of points and Want to find the closest points (in -X direction, +X direction, -Y direction and as well as in +Y direction) with respect to an element.

The pictures show the instances elements.

The points are

I want to have python code or graph that detects the closest points to an element. Please let me know the solution. Thanks in advance.

Here I am attaching the script file and Revit file for reference.

Calculate tributary area of column.dyn (178.2 KB)

Test for tributar area calculations.rvt (4.8 MB)

Not quite sure what the script does, but here’s my attempt at it. Odd that the columns generate their own grid, I’ve used the columns to make their own grid using that model, but the closest point logic is probably what you need in this case (near the end).

column points.dyn (35.4 KB)

1 Like

Hi @GavinCrump Thanks for your kind response but I am expecting the different out.

The orange colored marked points are the required. I need such points for all the columns. Please let me know the how to find out

How are these points able to be differentiated from the rest? If you filter your points by that first, then the same logic i applied in my script should work afterwards. Keep in mind I am not an engineer so it may seem obvious but i cant see it.

good morning
if I understand correctly you want the points of the common surfaces at your point
(I think you will need to use an if function for each point and sweep each surface)
if point i belongs to Sn (take the points of Sn) in the idea is that it?


1 Like

Yes you are right @christian.stan . I want to have a surface for each column with closest points to it. Kindly let me know how I can proceed ? I am stuck in the mid. Can you please explain it how I can use “if” condition

I think what @christian.stan is getting at is that you don’t want the points, but the surface they define as per both your illustration and the title of your graph (the tributary area of a column). As such I would go about this in a VERY different way.

  1. Instead of working with points, take the full floor plate and build a single surface.
  2. Take the lines which you’ve developed and group them by the X or Y direction (Curve.TangentAtParameter).
  3. Extrude the groups of curves by 1 unit so they are perpendicular to the surface and union each subgroup into a PolySurface.
  4. Split the surface from #1 by the X group, then the subsurfaces by the Y group to get individual surfaces as cells; each cell has to be carried by a column at one point.
  5. for each column: Goemetry.DoesIntersect (likely @L1 for the columns) each of the cells; then use a List.FilterByBoolMask node to filter the list of surfaces by the list of booleans (likely @L2). THe groups of surfaces can then be unioned into one surface, or worked with as a collection containing the full tributary area of each column.

If you really want points you can use Topology.Verticies and Vertex.Point followed by a Point.Prune Duplicates to reduce the scope.


I tried this see if it could work.

at the end of the graph I did a test to see if the point is part of the surface

I am a beginner
There are many things that can be simplified (I did with the means I currently have, not much)
essai qqch.dyn (25.2 KB)


1 Like

Thanks @christian.stan I will give a try and let you know.

1 Like

Hope you are looking for this type of solution as I have highlighted in the image.

Calculate tributary area of column_1.dyn (48.2 KB)

Sagar Jain


Thanks @honeyjain619 for finding out the solution. Here is the final script. and I really appreciate that you took time for this.

Calculate tributary area of column.dyn (174.4 KB)


Hi @JacobSmall Thank you so much for your support. I really appreciate that.