Dispatch the lowest curve

Hi all,

I have few curves around which are spheres. I would like to pick the lowest curve possible which sphere does not intersect with boxes around it.

I am attaching definition which I managed to do till now.Lower curves.gh (12.2 KB)

Cheers!
Agata

it’s more effective if you post a screenshot-

if by ‘lowest’ you mean ‘position’ (below the others) then place a point on such curves, grab the Z coordinates and plug into sort list along with your curves - once ordered based on Z your ‘lowest’ curve will be the first item resulting from sort list

Yes, by lowest, I mean on the z axis

Like this?


Lower curves_re.gh (19.3 KB)

good, worry no more…kim will save you

Thank you! :slight_smile:

Is it possible to run this definition with non-planar curves?

It is basically the same if you can define the base point of your non planar curves.

Yeah, but i cannot :frowning:
none of the components works for them

Try to use start & end point, or control point average, or middle point, …

I managed to find an end point but for some reason the script doesn’t work, there is sth wrong when I deconstruct the point. It probably is sth very easy I just don’t know :frowning:
Lower curves 2.3dm (15.5 MB)
Lower curves_2.gh (28.0 KB)

Lower curves_2_re.gh (5.6 MB)

try this

Hey Kim,
That’s fantastic! thank you!
I have tried to add the sphere back to it and it doesn’t seem to work ;/

But it doesn’t seem to create a sphere?
I need to pick the lowest curve which sphere will not intersect with any other breps.
Like in this image from one of the first scripts.


I’m just not sure where to add it in this script


Lower curves.gh (23.7 KB)

sorry way less elaborate layout-wise

you have alot of duplicate curves and some curves are splitted

corellaman thank you! it just picks up 3 lowest curves?
Sorry, I’m just very new to this so I’m not sure how to solve such problems

Seghier
yes some might overlap or not be closed, they are intersections from a previous script.
Not closed curves don’t have to be picked up.

I think I might not have some plug-in which you used? It shows such message when I’m opening your script

Lower curves 2.3dm (15.5 MB)

This seems to work cause it doesn’t give back any errors but it also doesn’t show the sphere ;/Step 2 curves and shperes.gh (32.3 KB)