Orient Geometry along X axis

I have several sets of curves. I can´t figure out a way to orient them along the X axis.

Curves.gh (122.7 KB)

Every curve must be rotated around its centroid.

I have something that suits you (if your curves are of type Rectangle3d) but t’s done via code. Notify if you need it.