Jump to content

Recommended Posts

Posted (edited)

As a fun project, I decided to parameterize the Lego rail system in CAD.  The main impetus was talking to a couple people modeling narrow gauge, who are aiming to replicate real yards, not stick to MILS plates, and thus have particular interests (like R200+ curves) that certainly aren't available in stores, but also might not have 3d designs to print anywhere online.

I won't say that I've replicated the original rails exactly, but I hopefully have all the features to make curves compatible with original parts and the Lego system. 

As yet I haven't printed any parts, but I'm getting close to a design I think matches up.

AMQzhfR.jpeg

For most purposes, the 3 basic variables are all you would need to change:

- #Gauge:  Studs covered by the rails.  Regular L-gauge track is 6 studs wide, of course.

- #Radius:  Stud radius of the track piece.  Centre of track to centre of circle.  Official track is R40, aftermarket usually goes up by 16s (56, 72, 88, 104, 120)

- #PerCircle:  Number of curves to complete a 360 degree circle.  R40 track uses 16, higher tends to go to 32 above R72. (64 above R152?)

But, to make it more flexible, I also have the advanced variables (I haven't tested these as much, so cautious use)

- #LDU:  Lego Design Unit.  If you wanted 2x scaled track, you might use this?

- #Stud: Width of a 1 stud brick.  Probably don't touch this.

- #Plate: Height of 1 plate.  Also don't touch this.

- #Tolerance: Tolerance around the edge of plates to make Lego easier to put together.

- #TieStuds:  Width of tie in studs.  By default this is gauge+2, minimum would be equal to the gauge.

- #TiesPerPiece:  Total number of ties (ends count as half each).  By default this autocalculates to space them roughly 4 studs apart, but you can pick any number 2 or more.

- #ClipSpacing:  Number of studs centre to centre on the end clips on the piece.  This is 2 for all official tracks, but it made sense to me to make adjustable.

I've split the model into 3 sections so it's also fairly easy to remove the ties if that's desired:

jlELj25.jpeg

For example, here is a narrow gauge half R40 curve with the middle ties disabled.  It's also possible to turn off the end ties and get bare rails with the end profile to connect to regular tracks.  You do this by right clicking the folder and choosing "Suppress".  I don't know how well they would attach to track in that format.

I've built this in Onshape and it's the first time I used their platform, so bear with me, but I believe you can view the 3d model at this link, and if you have an Onshape account, you can create a copy for yourself, so you can edit the parameters.

 Onshape Curved Track

Onshape Straight Track

Onshape Dual Gauge S-Curve Left

Onshape Dual Gauge Curve

To a reasonable degree, if you want a particular size to print, you can ask in this topic, and I'll enter the parameters, make sure nothing's too wrong with the result, and share an stl file.  Though to reiterate, I haven't tested it myself, no warranty that it's useful.

 

Other sample outputs:

Vr37dTu.jpeg

8-gauge R8, 90 degree curve, with 8 stud ties.  Maybe useful for a crane on rails?

Z3H0JOj.jpeg

5-gauge R120, 1/32 circle.

XLNR8FY.jpeg

7-gauge R88, 1/32 circle, 8-stud ties.  As you can see, if the ties are half-offset from the rails by mixing odd and even, it automatically removes the studs that would interfere.  "UCS Hogwarts Express" curve, though the model doesn't articulate, so other changes needed.

Edited by Stereo
add dual gauge track link
Posted

That's a great effort! I don't have an Onshape account and am looking for standard curves but in the narrow track radius (not sure what the radius is). I'm using tracks within the narrow track curves for narrow radius in this GBC setups at shows but trains derail frequently at the connection points with standard tracks.
 



If would be great if you would have an STL file available for me with a curve piece with a smaller radius that would fit exactly inside the R40 with a crossover pieces inside (or switch with a curve). I don't know what radius that is but maybe you can calculate please? I recently got a Bambu P1S and the print quality is great so would be very nice to be able to print and use on small tables at LEGO events.

Posted

I like where your work is going, @Stereo. I've been examining some alternate gauges for Lego trains myself, and found some interesting things: 

- As you noted, a 6-stud-long plate will carry a pair of 4.5V rails at the correct L gauge. However, measuring gauge in the conventional way (between inner edges of rails) L gauge is 12 plates (4 bricks or 4.8 studs.) 

- One stud wider than L gauge (what you call "7-stud gauge") is similar if not identical in gauge to the conventional model railroaders' Gauge 1. 

- One stud narrower than L Gauge (what you call "5-stud gauge") is the same gauge as conventional Q gauge or Proto:48 trains. (Realizing this has made me think it would be cool if some fans of 8-wide trains would try converting their models to Q gauge...) 

- Lego narrow gauge track is the same gauge as S scale track. American Flyer trains will run on Lego narrow gauge or roller coaster track (I have tested this,) and presumably vice versa. I'm hoping to someday convert one of the official LEGO 6-wide trains to run on S gauge track, as that is the correct gauge for 6-wide, 1/64 scale standard gauge. 

Hopefully this information about compatibility is helpful!  

Posted
2 hours ago, Berthil said:

That's a great effort! I don't have an Onshape account and am looking for standard curves but in the narrow track radius (not sure what the radius is). I'm using tracks within the narrow track curves for narrow radius in this GBC setups at shows but trains derail frequently at the connection points with standard tracks.

If would be great if you would have an STL file available for me with a curve piece with a smaller radius that would fit exactly inside the R40 with a crossover pieces inside (or switch with a curve). I don't know what radius that is but maybe you can calculate please? I recently got a Bambu P1S and the print quality is great so would be very nice to be able to print and use on small tables at LEGO events.

The narrow track radius is 24 studs, which does have a small availability on stores (eg. TrixBrix).  Anyway, with the understanding that you'd be a guinea pig in the process as I've not yet tested printing these, here is a link to an STL file for an R24 curve on Google Drive.  I think the most likely problem will be the clips needing tidying to work, as I've designed them at exact size, no extra tolerance added.  They are as far as I can tell 4mm diameter, so it should be easy to drill them open if needed.

41 minutes ago, L-Gauger said:

I like where your work is going, @Stereo. I've been examining some alternate gauges for Lego trains myself, and found some interesting things: 

- As you noted, a 6-stud-long plate will carry a pair of 4.5V rails at the correct L gauge. However, measuring gauge in the conventional way (between inner edges of rails) L gauge is 12 plates (4 bricks or 4.8 studs.) 

- One stud wider than L gauge (what you call "7-stud gauge") is similar if not identical in gauge to the conventional model railroaders' Gauge 1. 

- One stud narrower than L Gauge (what you call "5-stud gauge") is the same gauge as conventional Q gauge or Proto:48 trains. (Realizing this has made me think it would be cool if some fans of 8-wide trains would try converting their models to Q gauge...) 

- Lego narrow gauge track is the same gauge as S scale track. American Flyer trains will run on Lego narrow gauge or roller coaster track (I have tested this,) and presumably vice versa. I'm hoping to someday convert one of the official LEGO 6-wide trains to run on S gauge track, as that is the correct gauge for 6-wide, 1/64 scale standard gauge. 

Hopefully this information about compatibility is helpful!  

Yeah, to get specific, the way I've modeled it, it's 37.6mm gauge (inside edges of rails).  5 studs centre to centre, and the railhead is 2.4mm wide, reducing that from 40mm.  I am open to naming the gauges a different way (eg. call standard 5-stud since it's closest to correct, or 4 since that's the brick that fits between the rails), but I haven't really seen common usage, and I think this is easy to understand.  As you observe, +8mm makes it 45.6 which will run 44.45 trains on it, -8mm is 29.6 which nearly matches Proto:48 at 29.9.

I didn't actually mention it in the post, but it's possible for this to generate non-integer track - if you wanted exact O-gauge compatibility at 32mm, you could enter 5.3.  And so on... N gauge would be 2.3 studs, which is obviously not very useful, as the railhead would be about half the height of rolling stock, but does appear printable. One problem is you end up with more gaps between the studs.  And of course once you're in the weeds like that, you really depend on these files providing the entire ecosystem of tracks - which they don't, yet, only curves.  The antistud portion of the ties also doesn't really handle this gracefully yet - the outer ends of the ties are usable, but the middle needs to be over tiles.

Posted (edited)

@Stereo I got the file, thank you! I'm waiting for Black Friday to order filament that resembles DBG and will print when I get it. I will let you know how the fitment is.

Edit, I can print a few in black PLA tomorrow and will let you know, it's only 24 gr. per track with 4 wall loops and 15% Cross Hatch Infill. 

Edited by Berthil
Posted (edited)

@Stereo I've printed two in basic PLA:

  1. The two pieces connect with some resistance and stay together well. The 'click' when connecting with standard LEGO tracks was NOT there at the start. After connecting about ten times the click started to appear. I can image that with PLA the resistance could become less when attaching and detaching the printed track pieces a lot.
  2. The printed pieces connect well with standard LEGO tracks, the connecting 'click' is present.
  3. There is NO clutch power on the studs! These are too small.
  4. There is good clutch power on the underside of the track ends (to connect with a 2 x 6 plate).
  5. The tracks need to be printed with supports according to Bambu Studio. This means there are a  lot of supports to fill the cavities on the underside of the tracks. It is cumbersome to remove all the support from the printing plate. I can't imagine printing a lot of tracks like that. A solid underside would probably be best (except underside of the track ends), or some build in temporary support for the tracks ends to try to print the design without supports.
Edited by Berthil
Posted

Thanks for the feedback!  I didn't think to measure the studs, I just made them the same size as the underside openings, so pieces would fit without collisions.  Sounds like they're usable as tracks at least.

I wonder if Lego's regular antistud pattern (circles between every 4 studs) would be enough support to print without extras.  Or even the full "waffle" underside.  I'll do some research about that; making the ties solid underneath is also fairly easy if that's the best way to handle it.  I was copying Lego's design, which is optimized for injection molding - 3d printers have different constraints because they can easily add hollow cavities with partial infill and reduce material use that way.

Posted (edited)
5 minutes ago, Stereo said:

I wonder if Lego's regular antistud pattern (circles between every 4 studs) would be enough support to print without extras.

That might well be and probably the best way to go. I've printed overhangs above openings of 2 cm without supports. I'm sure the antistud pattern would help there but of course have no use on the bend sections. The track end underside already has a high clutch power so adding more clutch power with the antistud pattern is not needed. 

Edited by Berthil
Posted

I increased the radius of studs to match measurement (4.9mm), made the rail underside mostly solid and placed antistuds.  I connected them to the edges of ties so that the first print layer would be (mostly?) continuous cause I've heard that can be a concern too:

3Z6i3Ow.jpeg

I suppose you don't need to print it to see if the software requires supports.  If it still needs extensive ones I can redo it again.  It's still all procedural, so no issue to take these features back out.

Version 2 of standard gauge R24 1/8 circle track.

 

Posted (edited)

@Stereo That's quick and looks good! I will print one when another print (LEGO sorting trays) is done. With 'support for critical ereas only' enabled, there are only 3 extra supports on the 2nd opening of the 2 x 4 areas between the tracks (looking at it with the ends facing downwards). There seems to be a small irregularity between stud opening 2 and 3 when slicing the part, I can send a screenshot if you need one. The DBG filament is on order so will print them all soon. Thank you again!

Edit, uploaded the screenshot with area marked here.

I see these are probably caused by the radius indication as in your example.

Edited by Berthil
Posted (edited)

Yeah, I moved the radius label to the end ties to hopefully fix that. 6-gauge 24-radius track Here's an updated link.

I did another organization pass on the file to make it possible for me to manage multiple part designs.  So I've got a straight track model as well, now:

OY27KUO.jpeg

Track length in studs is the only new variable - with this piece design any length 2 or more will work.  The reorganization does mean that LDU, Stud, Plate measurements should really not be edited, as the design is now using their values from multiple files (not sure how to avoid this, variables don't seem available to share between files, only designs).

Edited by Stereo
Posted

I'm not sure I have any specific use for this yet, but from a technical perspective it's very cool! If you find a way to do points/switches I'll be seriously impressed *oh2*

Posted (edited)
6 hours ago, TeddytheSpoon said:

If you find a way to do points/switches I'll be seriously impressed *oh2*

Yeah, right now I foresee 3 problems - 1st, how to manage the spring that lets trains run through it the wrong way.  Can it be a 3d printed leaf spring?  2nd, what pattern to put the ties in.  The official track uses chevron ties, other brands do other things.  I'll have to do something that's easy to manage with adjustable radii.  And 3rd, splitting it into small enough parts to print.  An r104 switch is 40 studs long, 32cm, and is bigger than many consumer printers, even laid diagonally, so it likely needs a midpoint split of some sort, which should fall in the middle of a tie.

Edited by Stereo
Posted
On 10/24/2025 at 5:20 PM, Stereo said:

Yeah, to get specific, the way I've modeled it, it's 37.6mm gauge (inside edges of rails).  5 studs centre to centre, and the railhead is 2.4mm wide, reducing that from 40mm.  I am open to naming the gauges a different way (eg. call standard 5-stud since it's closest to correct, or 4 since that's the brick that fits between the rails), but I haven't really seen common usage, and I think this is easy to understand. 

No problem, I'm not challenging your name convention. As you say, it is probably the best choice for your purposes. I like brick-building track, so I'm used to calling L gauge "5-stud gauge" because that's the distance between rail centers. By the way, the thickness of 4.5V rails is different (slightly thicker) than PF rails, so L gauge has only been constant throughout time if you measure over rail centers, or minimum tie length. Interestingly, those are the standards we've independently gravitated towards! :laugh:

On 10/24/2025 at 5:20 PM, Stereo said:

As you observe, +8mm makes it 45.6 which will run 44.45 trains on it, -8mm is 29.6 which nearly matches Proto:48 at 29.9.

Fun fact: if you have a rail thickness of one tile, and set the rail centers 4 studs apart, you get track that is exactly Q gauge, which if I'm not mistaken is identical to Proto:48 in terms of gauge. 

 

On 10/24/2025 at 5:20 PM, Stereo said:

I didn't actually mention it in the post, but it's possible for this to generate non-integer track - if you wanted exact O-gauge compatibility at 32mm, you could enter 5.3.  And so on...

Cool! 

This reminds me, one thing didn't mention is that Lego retractable ladder elements, like the ones used on large fire truck sets, are HO gauge... or close enough that HO trains will run on them. :roflmao:

4 hours ago, Stereo said:
11 hours ago, TeddytheSpoon said:

If you find a way to do points/switches I'll be seriously impressed *oh2*

Yeah, right now I foresee 3 problems - 1st, how to manage the spring that lets trains run through it the wrong way.  Can it be a 3d printed leaf spring? 

Suggestion: make switches of the "derailing" type, where no spring is required. Real railroad switches work this way, after all. 

4 hours ago, Stereo said:

2nd, what pattern to put the ties in.  The official track uses chevron ties, other brands do other things.  I'll have to do something that's easy to manage with adjustable radii.

This may or may not work, but I would have all the ties from points to frog be straight, like real railroad switches. After the frog, all the ties on both the straight and curved paths can be standard. 

4 hours ago, Stereo said:

And 3rd, splitting it into small enough parts to print.  An r104 switch is 40 studs long, 32cm, and is bigger than many consumer printers, even laid diagonally, so it likely needs a midpoint split of some sort, which should fall in the middle of a tie.

The hardest part for sure, but isn't that the solution used by TrixBrix and other makers of 3D-printed switches? 

Posted (edited)
7 hours ago, L-Gauger said:

Suggestion: make switches of the "derailing" type, where no spring is required. Real railroad switches work this way, after all. 

This may or may not work, but I would have all the ties from points to frog be straight, like real railroad switches. After the frog, all the ties on both the straight and curved paths can be standard. 

The hardest part for sure, but isn't that the solution used by TrixBrix and other makers of 3D-printed switches? 

I think I have an idea for one that'll work "derailing", then swap the top point piece out for a design with a rubber band.  I'm thinking I'll make it a no-tools assembly, put the tie-bar in half-way, put the point on top, slide them together into place, so in normal switching actions the tie-bar doesn't move far enough to unlock the connection.  No welded-on underside cover.

Good info on the ties going past the frog.  I suppose Lego avoided it on R40 because the diverging track is ~30 degrees different by that point.

Yeah, other brands do that, it's just going to be a learning experience for me, cause I'll probably want to use a big boolean box to cut out half the part or something, and then do the usual clicky knobs + rail ends tweaks.

 

I went back to the FXBricks blog post about switch geometry to make sure I know what the design parameters are, and sort of simplified what they said back into triangles to try to get a generative form that'll let me show the "useful" switch sizes first.

First off, I figured out that the basic sequence being used is 1xN right triangles, where R40 uses N=3, R104 uses N=5 .  So for a start, I can do that whole sequence - even numbers produce radii that are in between Lego's ones, odd numbers match, so you have 3:R40, 5:R104, 7:R200, 9:R328 if you want a family of grid-compatible switches that match regular curve pieces.  I'll probably use these numbers as the basis for "parallel" switch setups - just select N and it'll calculate the radius, track length, etc. and produce something that goes to a track 16 studs away and parallel if you put 2 switches back to back.

(this is a Pythagorean triple 3-4-5 for the R40, geometry-wise.  R104 is 5-12-13, R200 is 7-24-25, R328 is 9-40-41.  so they all stay on stud grid.  The even numbers go to half-amounts - R68 is the N=4 switch, using 8-15-17 triangle)

Once you have this number N, some other values become easier to express - the "special straight" is 8/N studs long.  N=5, straight=1.6 studs.  N=3, straight=2.6 repeating studs.  So I can make a convenient table of "what size straight you need" for each switch.

The other one that I only noticed today, is that R64P combined with 8 stud straights is just removing that same 8x40 right triangle from the middle of the circle.  64+40 = 104.  Thus, if they sold 4 stud straights, they could have made an R84P curve that serves the same function.  The nice thing about this relationship is that it makes it easy to analyze other sizes - when N=6, you get an R148 switch, which is 48 studs long - if you use an R136 curve, you get (12/48)*8 = 2 stud straight tracks on either end to make an identical curve.  If you had an R68 switch and wanted to use an R56 return curve, (12/32)*8 = 3 stud straight tracks make the geometry match.  These still need an extra ~1/3 or 4/3 length curve piece to match up the angle, so it's not a magic bullet, but it does reduce the number of radii curves you need to have around.

They didn't say it explicitly but I'm guessing the reason it's not an R104P return curve is that it would be 11.31 degrees, only a tiny bit different from the 11.25 of a regular R104, and thus confusing to have both in production.

Extending these charts in new directions led me to the R111, 36 stud long switch - you can use it to connect parallel L-gauge tracks with 4 studs between instead of 8.  So you get a yard that's 4 studs more compact in both directions (shorter switch, closer tracks) and slightly wider radius than 104, and it happens to use 1 stud long "special straights" up the ladder, which makes it quite easy to stay on Lego's grid.  5 parallel tracks across 2 baseplates, instead of 4, and overall only 20 studs longer ladder if the shortest siding is the same length.  Could be useful to someone.

Edited by Stereo
Posted

I really like this work, especially because of the appearence of 5 studs covered narrow gauge track piece. We are used to use normal LEGO gauge as normal gauge (1435 mm), LEGO and TrixBrix narrow gauge as 600/690/760 mm narrow gauge, but the track inbetween representing 1000 mm gauge real life tracks are really missed!

Posted
On 10/27/2025 at 11:04 PM, Stereo said:

I think I have an idea for one that'll work "derailing", then swap the top point piece out for a design with a rubber band.  I'm thinking I'll make it a no-tools assembly, put the tie-bar in half-way, put the point on top, slide them together into place, so in normal switching actions the tie-bar doesn't move far enough to unlock the connection.  No welded-on underside cover.

Great idea! 

On 10/27/2025 at 11:04 PM, Stereo said:

Good info on the ties going past the frog.  I suppose Lego avoided it on R40 because the diverging track is ~30 degrees different by that point.

Quite probably so. :thumbup: 

I like your calculations on track geometry - I think you might have discovered a few new possibilities for custom track! In that respect... I have a question that you might be able to help with. 

I'm trying to figure out if it's possible to create L gauge track from ordinary plates and tiles. So far straight track, flex track, and switches have been simple enough, but the math for making a "curve" (really a polygon) is proving a challenge. So, here's my question - is it possible to have a polygon where the following are all true: 

- The total number of sides is a multiple of 4 (this will make exact 90-degree curves possible.) 

- The sides and the radius can both be expressed as whole integers (this will make it possible to build "legal" brick-built curves without stressing joints.) 

If such a polygon exists, what are the dimensions of the sides and radius? And, what would the angle between two sides be, measured in degrees? 

 

Posted (edited)
16 minutes ago, L-Gauger said:

I'm trying to figure out if it's possible to create L gauge track from ordinary plates and tiles. So far straight track, flex track, and switches have been simple enough, but the math for making a "curve" (really a polygon) is proving a challenge. So, here's my question - is it possible to have a polygon where the following are all true: 

- The total number of sides is a multiple of 4 (this will make exact 90-degree curves possible.) 

- The sides and the radius can both be expressed as whole integers (this will make it possible to build "legal" brick-built curves without stressing joints.) 

If such a polygon exists, what are the dimensions of the sides and radius? And, what would the angle between two sides be, measured in degrees? 

 

I don't know a formal proof, but I'm inclined to say no, once you're past the square (integer edge length and radius to middle of an edge, using 45-45-90 triangle) either the angle or edge will be irrational.  I imagine there are reasons why, but trig functions don't tend to have useful fraction values.  It'd be pretty easy to build a spreadsheet to explore the series of polygons though, seeing if sin(angle) or tan(angle) are rational when the angle is 360/n, with n a multiple of 8 (4 so you can make a quarter circle, and then x2 for each face being isosceles, not right).

 

Testing them out in Wolfram Alpha they all seem to start with 1/2 * sqrt(2*...) so there might be some half-angle thing going on that means it's always going to be a root.  I don't know the angle-splitting identities that well but sin(45) = sqrt(2) is what it might come from.

Edited by Stereo
Posted
23 hours ago, Stereo said:

I don't know a formal proof, but I'm inclined to say no, once you're past the square (integer edge length and radius to middle of an edge, using 45-45-90 triangle) either the angle or edge will be irrational.  I imagine there are reasons why, but trig functions don't tend to have useful fraction values. 

On 10/29/2025 at 3:40 PM, Stereo said:

Testing them out in Wolfram Alpha they all seem to start with 1/2 * sqrt(2*...) so there might be some half-angle thing going on that means it's always going to be a root.

Don't some numbers have rational square roots, like 4 and 16? If you're right, maybe that could be a path to discovering the right polygon dimensions... 

On 10/29/2025 at 3:40 PM, Stereo said:

It'd be pretty easy to build a spreadsheet to explore the series of polygons though, seeing if sin(angle) or tan(angle) are rational when the angle is 360/n, with n a multiple of 8 (4 so you can make a quarter circle, and then x2 for each face being isosceles, not right).

 

So, doing a little quick calculator testing with the 360/n formula, I discovered that a 5-degree angle (produced in LEGO by introducing a 1/2 stud offset on the 6th stud out from a hinge plate) yields a 72-sided polygon, 18 sides per quarter circle. A 4-degree angle produces a 90-sided polygon (this is the Grand Curve technique of @HoMa) but this can only produce a half-circle. Now, I'm just trying to figure out how to calculate the radius of the polygon from the length of one of the sides. (Now I'm starting to think I should have taken Geometry instead of Statistics for my math credit-hours... :rofl: )

Posted (edited)

More of a test piece than broadly applicable, this is for changing which side of a larger gauge the narrower gauge rides on:

A77Q926.jpeg

In this example, it moves 4-stud narrow gauge inside 6-stud standard gauge over the course of 32 studs.  It let me test several features of switch tracks - rails merging, guardrails, flat area for the flange to ride on - while being a smaller project.  It's designed as a half-piece that you print 2 copies of, to cut down on the size of the printed piece.

As before, it's parameterized, in this case you have 2 gauges (larger one as #Gauge, smaller as #DualGauge) and #TrackLen.

There are practical problems with designing a dual-gauge switch, that are solved by having the moving point be on the shared rail, so that's one situation where you might use this.

Unfortunately I don't see a good option in Onshape for creating the mirrored version of this part, so I'll probably end up creating two files, one where the narrow gauge shifts left, one where it shifts right.  For now I only have this "leftward" one.  I'll keep looking though, creating 2 versions of the actual switch file will be more tedious than managing it in this smaller design.  The reason it's a problem is the rail end clips - if you simply mirror the whole design, they'll end up backwards.  So parts have to be mirrored selectively.

e1mES6T.jpeg

Another example to demonstrate parameterization - this is 5 gauge with 4 gauge inside, over 16 studs (which makes it R64 curves - don't worry, the CAD does the math for you).  Sort of ends up being oddly shaped, in that the rails end right at the split between the pieces, so maybe it's worth designing a version that doesn't split there.

DEPEe8c.jpeg

And a 3-rail curve - the extra parameter #DualInset says how many studs from the inner curve rail the third track is.  So for 4+6 stud gauges, you set it to 3 or 2, depending whether you want the narrow gauge to run on the inside or outside of the curve.  Though the real point is things like this example, with 5.3 and 7 stud gauge, where there's no off the shelf piece available that does this.  Less than 1 stud gap may cause collisions, and likely doesn't work with Lego train wheels anyway.

Edited by Stereo
Posted

I briefly mentioned the Pythagorean triples before but I was thinking about them again, and used them to derive the curve radius for switches, so I'll demonstrate that:

LHxwE7E.jpeg

The base unit "1" is how far the switch has to diverge so that a symmetric piece will meet it from a parallel track.  Here it's 8 studs.  Switch "size 3" is thus 24 studs long, 3*8.  It creates the green triangle, whose hypotenuse is the radius of the curve, and 'base' is 3.  The other edge is 1 less than the radius by geometry.

So we have the Pythagorean triple r² = (r-1)² + 3².  In this case it's easy to observe that it's 3-4-5, but more generally, replace 3 with x and expand:

r² = r² - 2r + 1 + x²

2r = 1 + x²

r = (1+x²)/2

So for 'size 5', r = (1+5²)/2 = 13.  Multiply by studs per base unit 13*8 = R104.

Anyway, burying the lede, I've got parameterized rail, and most of the ties sized how they should be (in this case, long enough that the 2 end studs are usable on every tie unless they overlap the one diagonal tie).  The remaining gap is where the switch is operated, so it's going to be 3*8 studs with a slot in the middle.  I still need to remove a bunch of studs, add a switch mechanism, and add guards for the frog area.  All seems feasible with the tools I already understand though.  Took a while to find a process that would let me generate variable-length ties with correct integer lengths but it appears to be operational.

Posted (edited)

Good progress on the switch, it's now feature-complete for a version that will not let you run backwards the wrong way.  I designed it to use BrickTracks switch stands primarily cause I have a couple so I can measure them, but also I think they have a good feature set (works on either side of the switch as needed, low profile, simpler track piece).

UD1EHkM.jpeg

6-gauge R85 switch to demonstrate something new, not just a copy of existing sizes.  I was a bit conservative removing studs, so round tiles should stick to all of them, and square tiles to most.

9d6vGkn.jpeg

The switch mechanism's designed to assemble from the top with no tools.  First you slide the tie bar (light grey) in through its slot, first through the diverging rail, then back through the straight rail to lock it in.  Then use the underside features of the points to connect it:

1) Knob fits into a groove and can be slid into its place.

2) The other end of the switch has a slot for the tiebar to move it.

3) Then rotate the point into place and this ledge prevents the knob from popping out.

Once the switch stand is attached to the tiebar, the range the tiebar can move is limited to where ledge #3 is always engaged, so nothing can come apart.

I also have one feature that only makes sense for a 3d printed part - the straight rail is hollowed out so the point piece can slide underneath it.  This stops the end of the point from lifting up, without needing a little latch around the end of the point.  The groove #1 is curved away from the rail because of this - the point drops in at the loose end, but then slides under the rail.

One thing I'm not really happy with is that the point piece is lower at the knob end, so it has no ideal orientation to prevent supports.  The mechanism only has 1.9mm of vertical space to fit in otherwise, and I didn't want to go to <1mm thickness, so having it descend halfway into the tie keeps everything 1.6mm around there.  (the tiebar ends are 0.8mm thin around the hole, but it's the easiest part to replace if broken)

m7s1j8U.jpeg

I have some limitations on what I can generate because of the ties - they're only coded to work as multiples of 4 - but I can still use some odd numbers.  Here's a 5-gauge switch on 14 stud track spacing, making it R227.5 and 56 studs long.

I'm still stress testing it by trying odd values, but I think it's pretty close to ready to share/print now.  One flaw I'm aware of is that in 4-stud narrowgauge, there's no way to insert the tiebar without bending it.  The simple solution is cut off the end loop on the point side - it needs to be 1 stud shorter for the insertion method to work.  I'd also like to make a click-detent version of the tiebar so it's more functional without the BrickTracks switch stand, I just need to decide where along the tie to position it.

 

Once I'm fully happy with it, I'll set up a version of the file for diverging routes that just has you pick radius and track length.  Mostly a matter of going through and redoing some of the tie generation logic so it doesn't assume the two routes have near-equal track length.

Edited by Stereo
  • 2 weeks later...
Posted
On 10/26/2025 at 8:20 PM, Stereo said:

moved the radius label to the end ties to hopefully fix that. 6-gauge 24-radius track Here's an updated link.

I printed and the studs are still too small. Plates clutch better but tiles just fall off.

Posted
On 11/18/2025 at 9:34 AM, bogieman said:

This is very impressive work, well done! Do you intend to do a spring-loaded point version?

Dave

Yeah, I stopped working on it, to think about how to fit that in.   The main concern is keeping the tie bar's pin underneath the switch plate, so things can't get caught on the edges.  And it multiplies the number of states the switch can be in, from only left or right, to tie left switch right, tie left switch left, etc. with slightly different measurements.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...