I've been struggling with below for a while and hoping someone can shed some light on it.
I have a collection of edges (originally from curves, they are straight and have no mesh face) and I want to calculate the angles alpha and beta shown below.
These are labeled Edges 1, 2 and 3 in the image, but the ordering is not set. The are cases where there are only two edges and I need the angle between them but the case shown in the image is more general. I should also add that there are multiple other edges far away in the total input, but I think I can figure out how to isolate these specific edges on my own.
To be a bit more rigorous, I only want the angle between an edge and the next edge such that the angle is smallest - for example, from Edge 1, I don't care about the angle to Edge 3, only that to Edge 2.
The angle calculation itself is some pretty straightforward maths, but the part I'm specifically having trouble with is isolating the specific edge I want to find the angle to.
Markus has a great answer here on the problem of finding the nearest edge of a neighbouring mesh island, but I'm not really clear on how this can be modified to work with edges that exist independent of a face (if that even makes sense - I'm a bit vague on the terminology). I couldn't find a straightforward way of even referring to edge indices and feel like the solution will involve some degree of switching between mesh and curve representations of these objects.
I considered converting these to mesh and then using geometric proximity or sample nearest, but then got lost in the weeds of trying to keep track of which derived mesh came from which edge trying to trick Blender into doing what I want.
As a footnote, I'm still a bit of a beginner to geometry nodes, so some explanation of the logic required to achieve this I'd be greatly thankful for but is by no means required.
Any help offered would be sincerely appreciated.