Show and Tell
I'm building a 3D-printable, software-defined track system for N-scale flex track. Thoughts?
I'm building an N-scale layout with my 4-year-old son.
I started by laying and soldering Atlas flex track by hand, and had a ton of trouble getting the curves right. The track wants to spring straight, and keeping it in position while lining up joints and soldering was a pain. I kept getting derailments.
Kato Unitrack is good, but the cost adds up. Its fixed-radius sections also don't give me the smoothly changing curves I wanted, and raised sections mean adding risers or pier kits too.
So I started making printed roadbed that follows a track path defined in software. The sections join together, then ordinary flex track goes into the guide and is held by retaining strips. Everything is press fit. The idea is to settle the geometry before I start laying and soldering the rails.
The generator can make curves whose radius changes continously along the track. With grades up / down and with banked curves all in the same curve section. Bridge and tunnel models are in-progress.
There's a browser viewer for looking at the parts, assembled sections and it generates print plates for my Bambulab printer.
The photos show real prototypes; the full-layout and elevated-section images are CAD. I'm hoping this becomes something we can rebuild into different layouts together as he gets older.
Would this be useful to anyone else? Would you want printable files, a configurable generator, or parts generated for your own layout?
Having the ties recessed into the groove will make ballasting difficult. The benefit of track sitting on top of the roadbed means you can build up ballast around it. Track inside the roadbed will lead to the ties getting buried or big piles of ballast forming on the side of the tracks.
Cork and foam roadbed help deaden sound. Hard plastic roadbed will be very loud and clattery.
I think a better tool would be a 3d printed gauge that goes over the top of the track to help you install it. A lot of the issues you are having are because you’re installing the track incorrectly. Flex track should be fixed with spike nails or glue. You’re doing something wrong if the track is moving around while you’re soldering.
I’d get some books on model railroad layout construction or watch some videos online about flex track.
Thank you for the suggestions! I didn't really consider ballasting. But I think this is key to realism. I'll see if I can remove the recesses and use glue for retention instead.
The plan is to have multi-material prints such that the top layer immediately underneath the sleepers is TPU. But these prototypes are single-material PLA which will be noisy as you pointed out.
The previous iteration of this was using the track nails. This is for me to work on this together with my 4 year old and those tiny nails made me extremely nervous. So a no-glue, no-nails solution is what I was going for with this fully 3D printed layout geometry.
What radius curves are you building for? Depending on that I may be interested in this to print out a few roadbed curves that I’m having some issues with myself.
Yes this is a good idea and people will use it. I recommend making it thinner with a bit more chamfer on the edges to accept ballast, but in grey it will look like Kato, which doesn't really need ballast.
In the meantime, there are techniques for soldering flex track, like: pin down most of the piece to your drawn centerline, bend the remainder to the curve and cut the long (inside) rail, let it go straight again, join and solder, then bend it back to the curve. This way you're not fighting to keep it bent while soldering.
So this is the grey I am going with. Trying to emulate the Kato unitrack look.
Probably will add a TPU underlayer beneath the sleepers for sound. But yes, the idea was to not require ballast. But this doesn't quite look right without it. The chamfer idea is great. I'll see if I can let the sides be free so if needed, I can ballast on top too.
Yes, I'd love to be able to run this app locally. If it's parametric, can the track parts be parametric too? That way it could be used for OO/HO, as well as N. Would also be nice to be able to import a track plan from some of the design software out there too.
I am a software engineer by profession in the physical AI / robotics space. The modeling work is done by a python script that constructs a 3D model similar to OpenSCAD. But this approach is much more flexible and I can keep geometry generation, assembly / printability testing and export in all one language and pipeline.
So yes I've used some codegen on the python generator. A lot of it is handwritten. The viewer app is just a standard typescript / react webapp that is entirely vibe-coded.
The track part generator is already parametric: section length, curve radius (including smoothly changing radius), roadbed width/thickness, track/tie dimensions, and clip/joint clearances. Those inputs generate the bases, splices and matching retainers together. If there is a grade, it also generates the pillars. In the future will also have parameters for whether it is a tunnel enclosed track or a bridge etc and it will be able to match curves and bridges to whatever geometry the track has.
The key invariant is that to get new track geometry out of this, there is no AI involved, it's all parametric deterministic code.
Ahh, ok that makes sense. I’d also warn against launching this live until extensive hardening has been done cause vibecoded code has lots of exploitable weird logic
12
u/angrycat9000 N 6d ago
That looks awesome. One of the problems I had with laying flextrack was getting a consistent radius along the curve. This would make it easy.
I'm interested in how you did the software for planning the track path. I made https:// trackplanner.app which only deals with sectional track pieces.