in reply to Closed geometry: a train track problem

Ah, you're peering into The Abyss. (Unless you're a lot smarter than I, which is very possible, maybe even likely.)

I've thought about the same thing, and had some good responses here:

Re: If I had a Free Two Months...

I think I can do 'regular' pieces, but switches that can be flopped over to switch right or left, and valid 'cross-overs' (ie: over-bridges) v. invalid collisions just make my brain start to smoke.

Best of luck. If you make progress, please share it here on PM. This is a *great* problem.