Rotate geometry based on alignment

Hi all,
I was looking for a way to align a geometry based on it’s normals.
The first here is to align the element based on curves and the normals I already got.
A bonus would be if there is a way to rotate the element if the normals are in a wrong way…
Is there any component that could help?

I’ve put the part of my scrip that creates the normals of the correct faces in here aswell

Moved to Grasshopper category

You’ll have more luck if you attach your definition. Look into using ‘Angle’ to get the angle between two vectors and rotating the geometry by that value. Also the ‘Orient’ component will help if you can get an initial plane and a target plane.