Match points with opposite ones

Hello,

I have two sets of arcs which combine to create a shape. The number of arcs is variable. I would like to select specific, opposite pairs of arcs so I can use them to make other geometry. Additionally, I would like to specifically select the pair of arcs that runs along the y axis.

I cannot figure out how to select the arcs in pairs, or how to select the pair that runs along the y axis. It is also important that this be able to work if there are more or fewer pairs of arcs.

Thank you


Sept 24 Grasshopper Plan 1.gh (80.8 KB)

Wow! Where to begin?

Many ways, you could do this:


Grasshopper Plan_2024Sep24a.gh (56.5 KB)

2 Likes

Branch selecting at the end is just for coloring.


CURVES.gh (61.9 KB)

1 Like

Looking at only your results (image), not your code:


Grasshopper Plan_2024Sep24b.gh (62.5 KB)

You can just create a line in the direction you want to check and then check for intersections with that line:


Sept 24 Grasshopper Plan 1_findarcs.gh (62.1 KB)

Thank you, this one does not quite work because when I change the number of sides of the polygon (the variable in the very first group) the selected arcs are not opposite each other.

Thank you, this does work when the number of polygon sides are changed, but I have to keep working on the file some more before I can determine if this is all I need

That’s because of how you create the regions. Easily fixed by replacing the shift list slider with an expression: (x+1)/2


Grasshopper Plan_2024Sep24c.gh (63.6 KB)

P.S. You could also do this by rotating the polygon appropriately but I won’t touch that because I’m afraid once I start to modify your code, I might re-write most of it. :wink:

I tried to ignore it but hope you will consider this:


Grasshopper Plan_2024Sep24d.gh (30.6 KB)

Image shows complete file.