You did this by using your own custom code?
Could you post it, please?
I don’t use any code . I used two commands InterpcrvOnSrf and Sweep1
And the rail curve? How did you generate that curve on surface?
Here there is my old YouTube tutorial