Elektrine lite

← Feed

@monoidmusician@tech.lgbt

Post #1890866

2026-04-25 15:44 UTC

now with 50% fewer derails! still sticking to plain strokes, it's possible to implement check/guard/wing rails, and it makes it look a lot more convincing active switching elements will require actual scripting, but these check rails just require extracting subsets of each path to mark around each junction (yes, they use markers on the ends like the bridges) this is my silly layout just for testing, don't mind how sharp the curves are for the switch, there is a mask that removes the guard rail from the area where the routes intersect for the three-way switch, it needs two masks (and five paths): one to select no intersections again, and another to select 2-but-not-3 intersections, to paint the wing rails on the inner V

Replies (1)

  • @monoidmusician@tech.lgbt 2026-04-25 16:18

    right now this is very much a manual process: duplicate the paths from the ordinary route, trim them down, add them to the groups/clones/whatnot (in Inkscape you can double click on a path to insert a node along the path, then delete the other nodes) you could imagine an algorithm that calculates intersections to lay these check rails automatically: calculate whether it is a crossing or a switch/turnout, calculate how far away each stroke should go, and add those paths to the layout with similar algorithms, you could create the active elements too, but it would require some work: Bézier subpaths and interpolation for flexing rails (either switch points or stub switches), and some geometry to lay out swingnose crossings. all types of active elements also require modifications to the mask that provides for the flange clearance, at least for ideal geometry

    Open ##1890867