For LEGO track layout planning, Bluebrick by Alban Nanty is the most powerful tool that I am aware of.
Bluebrick can be downloaded here: https://bluebrick.lswproject.com/
Bluebrick requires Microsoft Windows, but someone has also managed to run Bluebrick under Linux.