Had an idea. Someone beat me to it.

The plan was a free web page where you set a length, a curve or a switch, pick peg or socket ends, and download a 3D-printable piece of wooden train track that fits the usual 40 mm toy sets.

I got as far as working geometry and registering this domain. Then I found it already exists, and it looks good:

Go to WoodTrack →

Prefer OpenSCAD? opentrack is an open-source take on the same idea.