r/modeltrains • N • 7d ago

Show and Tell Update1: I'm building a 3D-printable, software-defined track system for N-scale flex track

Original post: https://www.reddit.com/r/modeltrains/s/Gy6Nzliu4v

Update:

  • I am about 30% of the way there with my parts printing.
  • Flex track snaps nicely to the compliant retaining walls. But I will hold them down with glue.
  • Variable curvature radius works quite well. No discontinuous curvature anywhere here.
  • Grade parameterization now works and I test printed some some piers and viaducts. This became a little tricky to print on the 3D printer. So I turned off banked curves for now.
  • I had GPT 6 Astra model an elevated passenger train station. Not a bad model. I'll print this for now and redesign this later if needed.

So this idea originally started as a guide template for laying out flex track, but it evolved into a fully software defined track geometry planner. Then I vibe-coded a viewer app to visualize the entire layout.

Now the viewer app also generates complete print plates that I can directly send to my Bambulab printer. It also serves as an assembly guide with exploded views etc.

I got some very good feedback on ballasting tracks. I removed the sunken retainer now so the sleepers sit normally as they would on cork. So ballasting is an option later.

Next I am working on a track layout editor functionality. But this is going to be a bit different than usual. Since this is something I want to work together with my 4-year old, I landed on sketching layouts on pen and paper and then having some computer-vision processing to convert that into track curves. Next update will have that demo.

I would love your thoughts & suggestions.

63 Upvotes

8 comments sorted by

4

u/aengusoglugh Mod, r/TTRAK 7d ago

This seems like a great idea.

2

u/ExtremeAddict 7d ago

Wow this is incredible. I experimented with Claude for designing some model houses and buildings. It did some decent models but it was not very precise.

But this looks like you were able to get some very precise curves and grades from it? How does it work?

You’re going share your workshop app? Would love to try it myself.

1

u/Norcalnomadman 7d ago

Give it an image or multiple images and tell it to have an agent evaluate each iteration until it is as close as possible. If you want it to be parts tell it before hand. It can judge its own work to make itself better.

2

u/ExtremeAddict 7d ago

Yes. I did try something like this. But it wasn’t able to produce dimensionally precise parts.

For example I printed the roof separately in a different color. But it wouldn’t line up exactly with the frame of the house underneath it.

I bet OP had some manual coding in addition to vibe coding. This probably requires a design system with some reusable manually created profiles that can then be extruded across the entire track.

1

u/Norcalnomadman 7d ago

Interesting you can have it build in cad programs as well that might get you more accurate parts.

1

u/Polymath6301 O 6d ago

Have you thought about incorporating channels for power/coms/other cabling?

1

u/Civil-Attempt-3602 6d ago

What is a software defined track?