# Average Curve Endpoint Direction (Geonodes)

I'm working on a system that converts Edges from a Mesh into Curves with this Cylindrical shape. The issue i'm having is that depending on where i've started extruding this Edge the Root/Startpoint of the curve is not in the desired direction. So i want it to kinda average and then reverse the curves that are in the wrong direction.

#Edit

Another Example, here's with a model that i've made. i want all the endpoints in this case the Red Cubes at the bottom and the Start Points the Blue Cubes at the top

• Why don't you just flip the original mesh edges in Edit Mode by rotating them 180° around their median point? Commented Apr 8 at 6:12
• A share on blend-exchange.com would really help us out, here. There's a slight whiff of XY.. could you clue us into your overall objective? Maybe you can get the knife in before the mesh-edges are extruded? Commented Apr 8 at 6:18
• @GordonBrinkmann that's was just a simple mesh to use as an illustration. What i'm trying to do is something like working with Curve, but instead with Edges, so whenever i'm modelling theses Edges to create Hair for my Character the Root or Tip of the Edge after converted into a Curve with Geometry nodes it goes in random directions, i think it has to do with its vertex order, so i'm trying to find a way to average these so they all flow in the same direction. (Hope i'm clear with my explanination, English isn't my native language, but if that's not enough i'll try to explain in another way) Commented Apr 8 at 17:48
• @Joey522: i don't understand when you want to reverse the curve? i think it is not always in positive z-direction, or is it? we need a rule from you, in which direction you want your curves. Commented Apr 8 at 18:19
• @Chris Here's with a model that i've mad i.imgur.com/xm82u4u.png, see that the directions are random, i want all the endpoints in this case the Red Cubes at the bottom and the Start Points the Blue Cubes at the top Commented Apr 8 at 18:37