Orientate perp frame to make a simple sweep


I’m a very beginner on GH so I guess my problem is not a big one but:

I want to make a rectangular sweep on multiple triangle curves.
Each curve is on a differently oriented plane.

So I put a perp frame on these curves and then a rectangle on these perp frame to get the section I want for my sweep.
But all the rectangles generated are in random directions!
(they are on the good perp. plane but rotated randomly…)
I would like them to be perpendicular to the surface on which the triangle curve (the rail) is.
For example having the Y axis of the perp. planes corresponding to the normal of the surface…
Is there a way to do that?

Thanks for your help!

Well … study the static attached demo where the “tri frame” generation is split into 4 Phases (in 4 Layers). Is this what you are after? (BTW: have in mind that the general case of this IS NOT a task for a novice by any means [clash handling, interactive on the fly node(s) modification(s), part connectivity etc etc]).

NOTE: for obvious reasons the sections are not rectangles due to the taper angle required between the modules on a per neighbor edge basis.

TriMesh_thickenDemoPhases_12A.3dm (574.4 KB)