Parametric Frames from curved Surface

Hello All,
I hope you are all doing fine during this weird times.
I’m now working on creating a parametric desk and got stuck in the process. I attached two pictures and the rhino+grasshoper documents from the project.
There was a surface created which was modified using pointson and rebuild commend. Now what I’m trying to do is split the surface into frames and creata a certain depth and thickness to them. However it seems that the process goes wrong since the frames dont follow the curved path of the surface. It only does it on the x-axis. I’m a very very beginner with rhino and grasshopper. The system was also created with the help of some tutorials on youtube. I experimented in grasshopper this morning but cant find a solution to it.
I hope you can help me further with this issue.
Thank you very much and have a nice day :slight_smile:

the parametric desk.3dm (6.0 MB) parametric (12.3 KB)