Bypass "curve nearest object" (suggestion needed)


I would like your suggestion(s) to substitute my current method with something faster—I am using the Curve Nearest Object component to target all breps on which intersection lines exist.

Currently I target two lists of intersecting breps—on one list they act as ‘verticals’ and on the other one they act as ‘horizontals’:

In this sample of only 15 breps, the component takes ~ 4 seconds:

This quickly escalates to long minutes when targeting two larger lists of breps.

Subsequently, from the midpoint of each line I get the plane(s) at the location on the brep(s), via evaluate surface, following/maintaining the original order of the two lists of breps:

Do you have a suggestion to speed this up?
I thank you in advance.
Here’s a file: (668.1 KB)

*I had attempted using the midpoints mentioned above with the Pull Point component (instead of the Curve Nearest Object), which was faster, but then I struggled to retain the two-list structure.

this might be faster, using Pull Point without the “Closest” option gives you some precious Distance data that you can use to revert to which index is the closest one:

btw, red circles connected with arrows means you can replace one with other :slight_smile:

the Area components with subraction are there just to double check if the data structure was the very same (in theory if they are all zeroes either the solution is right or you have been very lucky -or unlucky- ) (676.9 KB)

just a variation on the above, you can also have Sort directly spit out the result, the only thing is to make the two data trees inputs on Sort to match (red group: Grouping works well for that, but probably is not the best way to do it…) (678.9 KB)

1 Like

@inno - thanks, you the man - setting up the pull point to ‘all’ instead of ‘closest’ was the way to go:

1.5 seconds vs 1.2 minutes is a significant difference.
The alternative version using grouping I can steal for something else, so thank you for your help.

1 Like