Wookey,
The TunnelX program already has an SVG exporter that exports splines with the right control points here:
This would save a lot of effort re-implementing a TunnelX file parser when it's got one already, so it's just a matter of looping through the geometry and writing it to a .th file in the format you want.
We could also use the TunnelX subsets (currently used for colouring) as the basis for blasting apart single directly editable Sketch files into hundreds of little Scrap files of non-overlapping passageways by exporting the geometry assigned to each subset tag to a file of the same name. If there are enough young folk on expo who are raring to do it all in Therion, send them to me and we can write and debug these exporters together. I won't do it on my own because Therion is too hard for me to operate.
As you know, I've moved far beyond this 2D cave representation business, which I now believe is fundamentally obsolete in the era of cheap lidar scans and GPUs built into every phone. There's a short little demo here, which shows how elevations could actually work on a phone (since no fixed 2D view can ever be adequate):
https://youtu.be/zIQAslYa_HA?t=43 and you can download copies direct to your Quest2 VR headset here:
https://sidequestvr.com/app/1630/tunnelvr Once you start working in 3D you begin to realize just how spectacularly little is conveyed in these 2D drawings, for all their visible complexity and clutter. I've put together a talk at the UIS conference about it and will bring demo equipment.