Profile Orientation issue

The orientation of the profile is coming out perfectly in the X direction, but it’s not turning out as well in the Y direction and in arbitrary directions.

Open_State.3dm (46.2 KB)
Structural Modelling1.gh (33.6 KB)