Getting closest point to a line in a grid

Hi , does anyone have any golden nuggets on how I might go about getting all the points in the grid closest to this curve?

There is a node called Geometry.DistanceTo it might be worth a try
Mind the lacing option

Do you have any tips the distance to doesn’t seem to pick up the curves or points along it in any sort of order

Might be better to build a rectangle at each point, and collecting the objects which the curve passes though in the order which they pass (so from parameter 0 to parameter 1). Could be computationally more heavy but I’m not sure.

Thanks Jacob

I tried does.intersect with surface, curves, polycurves and solids false for all accounts. Any other tips?

Working fine for me (used both rectangles and circles of a given dimension) as shown with the green circles.

You can also filter by a maximum allowable distance as shown with the Red dots.

Both methods used a maximum distance of 0.5 units.

3 Likes

@JacobSmall
Thats the first time i see a Data.Remember node
Can you tell us what it does?

This is from the Refinery beta package. Typically it allows for use of Revit data in Refinery (which has no direct connection). It’s a node which remembers most basic data types. In thus case I had built a big ugly set of nodes to make the Nurbs curve.

@Marcel_Rijsmus you should definitely check out the beta.

1 Like

@JacobSmall
Thnx, but for the time being its olny sandbox stuff i do
I will read, whatever i can find

Even sandbox has a lot of uses. Such as the one I used. Imagine not having to recalculate a long running set of nodes to build a mesh each time you open a graph? Or parsing the data out of a large document so that you get to just the stuff you need faster? Good stuff all around. :slight_smile:

1 Like

Great node to know about!

So the finished business. closest point achieved. I managed it several different ways but this by far seemed the fastest computationally with circles over squares (also using circles gives a better point closest to management with radius as an indicator) and using a polycurve to intersect.

The issue was I didn’t flatten my curves list.

Thank you for all the help and the reference of useful nodes!