How to control the orientation of a perpendicular frames along a curve

Hey everybody. I`m very new using Grasshopper and rhino so I would appreciate your support and help on this question.
I need to make a rectangle following a group of lines projected on a surface. This rectangle shape is created based on a specific size of splits I did by multiplying a domain.
What is happening right now is that the perpendicular frames I created are making the splits not flat to the surface. I will send pictures to explain.

Can you guys help me orient it to be flat with the surface under it? I thank you a lot for the support.
The current layer were the referenced lines are in the Rhino model is “00_NEW_curves_splits”.
The grasshopper script that controls it is in the file highlighted with a red box

GRASSHOPPER_TEST_SPLITS.gh (16.4 KB)
GRASSHOPPER_TEST_SPLITS.3dm (689.8 KB)



@luizfellipe.machado
Try analyzing the surface (Evaluate Surf is the name I think) at the point of each of your curve perp planes (Use surface closest point for uv positions) and align your planes (Align Plane) to the surface normal at those points.

1 Like

@luizfellipe.machado
Found a couple minutes this morning to do this. Simply added what I said. Let me know if it does what you want. Looked good to me.
GRASSHOPPER_TEST_SPLITS Ryan.gh (14.6 KB)