Try to make a corner with curve I working on a train game, and I try to make "rails", what are basically a square with a throgh part in middle (the dark parts), My problem is that, I want this part to turn curvy (90 degree), like I illustrated, to join vertical or horisontal rails perfectly. I can bevel the edges to be curvy, but the gap between them is larger than the gap between the straight parts.

How can I do this?

Thanks for any help!
Starting from the profile of the rails, you can use the spin tool: