Help ! Seeking Advice on Script Simplification and Troubleshooting

Hey everyone, I’m trying to set up panels, and since the dimensions might change frequently, I’m attempting to configure them.

I have three questions:

  1. How can I simplify this script? It seems like I’m always making things overly complicated for simple tasks.
  2. Secondly, when I try to apply it to multiple curves, it stops working. I’m constantly stuck with the same problem when I need to duplicate and flatten. How can I avoid using ‘flatten’?
  3. Lastly, when I apply it to an angle, it goes haywire. Any advice on how to handle this?
    Screenshot 2023-10-12 at 22.01.10

Problem 12 oct.gh (10.7 KB)

Thanks in advance!

@Julien_B
This may do for you.
Let me know if you break it. Alot of it has to do with managing data trees. Its a quick and dirty script by the way. Feel free to correct it. :slightly_smiling_face:
Problem 12 oct Thoughts.gh (22.0 KB)

1 Like

Thank you so much it work perfectly !