Portholes issue with the curved surface

Hello guys,

I created a script for the potholes. but I facing an issue when it is translated to a curved mesh. Please help me as I am a beginner and I created the script using.


it is working well on this one.

But when I apply to this, it is creating a problem. I want to do this since my building is a cocoon model and I want to use this for my roof.

Please help me.

files:
potholes.gh (20.0 KB)
potholes.3dm (15.4 MB)