Sweep1 creating undesired result

Rail and profile below


Result

sample.3dm (26.0 KB)

what result do you need / expect ?
check those topics

Apart from trimming issue, you will see that profile is not sweeping perpendicular to rail curve. What is the solution for that. by the way, thanks for reply, i got to know that we should get our fundamental strong.

Actually, i got it, i have to align it 45 degree at the point where it starts or
I have to place my profile on the edges of the rail.