Hi everybody,

as the title says, I got stuck unifying the direction of the meshedges for a meshface.

I am extracting a meshface, getting the edges, comparing the angle between a line from startpoint to facecenter(lineA) and a line from endpoint to facecenter(lineB).

```
private void RunScript(Mesh mesh, ref object Lines)
{
if(mesh == null)return;
var lines = new List<Line>();
var MTE = mesh.TopologyEdges;
for (int i = 0; i < 1; i++)
{
//make a plane for the actual face for compare points to flip edge if necesarry
Vector3d normal = mesh.FaceNormals[i];
Point3d center = mesh.Faces.GetFaceCenter(i);
Plane plane = new Plane(center, normal);
var edgeIndices = MTE.GetEdgesForFace(i);// get all the edges for the face
for (int j = 0; j < edgeIndices.Length; j++)
{
Line line = MTE.EdgeLine(edgeIndices[j]);//get the actual edge
double angle1 = Vector3d.VectorAngle(plane.XAxis, line.From - center, plane);
double angle2 = Vector3d.VectorAngle(plane.XAxis, line.To - center, plane);
if (angle1 > angle2)
line.Flip();
lines.Add(line);
}
}
Lines = lines;
}
```

I am not sure if this is a proper way. Can this work?

Any hint is really appreciated.

Have a nice Eastern !

Thanks everybody!

File:20210405_UnifiyMeshEdges.gh (5.7 KB)