Unsual behavior of Point.Project node

I am using Point.Project node to determine the location of an element with respect to its surrounding grids.

In the attached image, I can see the node working perfectly fine with a Point created by Point.ByCoordinates method. But when we input a point with the same coordinates obtained from Element.GetLocation node –

  1. Projected Point on Grid A goes missing?
  2. Rest of the Projected Points (on grids B and C) are not aligned on x coordinates?

Attached rvt and dyn files for reference.

TestGrid1.rvt (2.0 MB)
Surrounding Grids1.dyn (40.8 KB)

Hi @theshysnail

How about using “ClosestPointTo” node?

1 Like

It does work but here I wouldn’t have the option of choosing the projection direction (Y and -Y) to get the grids on either side of an element.

I want to get the surrounding grids for any element in this format — AB/23.

@theshysnail Well, I have an answer for that:

3 Likes
  1. Group the grids into X and Y subsets.
  2. Use Geometry.DistanceTo find the distance from the point to each grid.
  3. Find the index of the minimum distance in both sublists.
  4. Get the grid at that index to know which grid it is closer to.
1 Like