Straight sections are mostly ignorable since you can always add them in pairs on opposite sides of the loop if they are parallel. (although there are some interesting triangle-shapes that can be made that break that pattern)
My friend even went so far as to code up a solver for it which mostly worked and generated some interesting layouts. We never got around to adding switches into it.
It eventually led us to the math behind necklace problems because it was often hard to tell if 2 track layouts were identical: https://en.wikipedia.org/wiki/Necklace_problem