DIN rail: the 35 mm rail and its clip
Open an electrical enclosure and everything hangs off the same bar: the breakers, the relays, the power supply, the terminal blocks. Nothing is screwed to the cabinet's back panel; each one clicks onto the same metal rail with a single push and comes off again with a quarter-turn of a screwdriver. That rail is the DIN rail, and the clever part is that the catch is standardised: any module, from any brand, mounts on the same 35 mm section. If you want a part of your own — a bracket for a printed module, a fuse holder, the base of a whole project — to live in that enclosure alongside the rest, you have to print the clip that grips the profile. And that clip is a cantilever snap-fit — with all that implies for FDM.
What the rail is, and where the clip grips
By far the most common is the top-hat rail, designated TS35 and standardised in EN 60715 (the old DIN EN 50022). It's a strip of formed sheet metal whose cross-section looks like a top hat: a flat base with two walls that rise and end in two lips folded outwards. Those two upper lips are the only parts that matter for mounting. You don't grip the base or the walls: your part's clip hooks under those two folds, 35 mm apart, and everything else in the profile is only there to keep them rigid and spaced.
Understanding that changes how you draw the clip. You're not designing something that wraps around a 35 mm block; you're designing two hooks that pinch two thin lips 35 mm apart, one on each side. The 35 mm gap sets the spacing between the hooks; the sheet thickness, 1 mm, sets how far each hook has to reach past the lip to stay caught on the back face.
The section, in real numbers
The standard TS35 is very consistent in its main dimension — the 35 mm width — because interchangeability depends on it. The other dimensions come in variants, and it's worth knowing them before you dimension your clip.
| Dimension | Value | Notes |
|---|---|---|
| Hat width | 35 mm | lip to lip; tolerance around ±0.3 mm |
| Hat depth | 7.5 mm | standard variant; a deep 15 mm version exists |
| Sheet thickness | 1 mm | typical; 1.5 mm versions exist |
| Upper lips | the two folds, 35 mm apart | the only thing the clip hooks onto |
The 35 mm is the dimension you can take as given. You can't always take the other two as given: there are deep top-hat rails at 15 mm instead of 7.5 mm, and 1.5 mm sheet versions. None of those variants changes the 35 mm gap — and therefore the catch — but they do change how far the lips stand proud and how much space is left behind the profile.
The clip: one fixed hook and one arm that snaps
Almost every DIN catch works on the same asymmetry: one fixed side and one springy side. On one side, the clip has a rigid hook, formed as part of the body itself, which you engage first by resting it under one of the rail's lips. On the other side there's a hook mounted on a springy arm — a metal spring in commercial parts, a cantilever of the plastic itself in a printed one — which you push against the second lip until it snaps over and drops behind it.
That's the snap-on gesture: engage the fixed side, rock the part against the rail, and the springy side snaps home. To release it, you pull on the springy arm — usually via a tab where you slot the tip of a screwdriver — draw it clear of the lip, and the part swings out. All the mounting mechanics live in that single cantilever arm: it's what flexes on the way in, what holds when it's seated, and what has to give to let go. And in FDM, a cantilever that flexes over and over is exactly the geometry least suited to the way the material is laid down.
Clearance to clamp the 35 mm without forcing it
Here's where the FDM bias comes in, and it works against you twice over. The inner gap that clamps the 35 mm is an internal dimension — a sort of elongated hole — and internal cavities come out undersized when printed: the bead bites inwards and closes the gap up on you. If you draw a dead 35.0 mm, the gap comes out below 35 and the rail goes in under pressure, forcing the arm from day one; and if your rail also happens to sit at the wide end of its tolerance, it may not go in at all. You have to open that gap on purpose. The reasoning is the same as in Real printed clearances: think per side, and add the two sides together only at the end.
| Clip element | Starting dimension | FDM adjustment | Result |
|---|---|---|---|
| Inner gap between hooks | 35 mm | +0.15 to +0.30 mm per side | 35.3–35.6 mm gap, goes in cleanly |
| Hook under the lip | 1–1.5 mm overlap | towards tight, no clearance | holds against the fold without rattling |
| Behind the lip (sheet thickness) | 1 mm | +0.1 to +0.2 mm | the hook seats on 1 mm without wedging |
Notice that the two dimensions pull in opposite directions, and deliberately so. You open the 35 mm gap so the profile goes in loose; you keep the hook's overlap on the lip tight so that, once inside, it doesn't rattle. A clip that goes in easily but then clatters is a clip whose gap is right but whose hook is too short: it doesn't reach far enough past the fold, or it has too much slack behind it. That's why the hook wants a generous overlap — 1 to 1.5 mm behind the lip — and little clearance, while the gap wants the opposite.
Those starting numbers are calibrated in PLA, but PLA isn't the material you'll be printing an enclosure clip in. If you jump to PETG, add 0.05–0.10 mm per side to the gap: it oozes a little more and comes out slightly oversized. And don't rely on the arm's grip alone for retention. A thermoplastic under constant preload relaxes its stresses over time — the arm gives a little and the force it grips with drops, even though nothing breaks — so what really has to hold the part on the rail is the fixed hook and its overlap on the lip, not the springy arm's tension. The arm provides the click; the fixed hook provides the grip.
The arm's travel is the other dimension you can't skimp on: for the hook to snap over the lip during mounting, the arm has to be able to flex at least as far as the lip folds outward. If the cantilever is short and stiff, there's no travel, and instead of snapping, the part cracks. A long arm of modest section flexes a lot at low stress; a short, thick one barely bends and concentrates all the effort at the root.
Orientation, layers and the root fillet
The springy arm is a cantilever working in bending, and bending has a side in tension: the outer face of the arm stretches every time you mount the part. That's the FDM trap. If you print the part upright, with the arm growing in Z, the layer lines run across the arm and that bending tension pulls directly on the bond between layers — the weakest there is. The arm snaps along a layer line on the first click. It's the classic failure mode of every printed snap, and here it's almost guaranteed because the arm is meant to flex many times.
The fix is one of orientation, not design: lay the part down so the arm extends in the print plane, with the layers running along the arm. That way the bending loads the material along the beads, not against the weld between layers, and the arm survives cycles without delaminating. It's exactly the principle developed in Print-friendly snap fits: in a cantilever snap, orientation isn't a finishing detail; it's what decides whether the part lives or breaks.
That said, laying the part down isn't enough on its own, and it brings two complications. The first is about material: orientation removes delamination, but it doesn't turn PLA into a good cyclic-snap material. A PLA cantilever flexed over and over fails by fatigue even with the layers in its favour. For a clip you mount and unmount often, PETG, PP or nylon take the cycles far better than any PLA. The second is geometric: laying the part down leaves the throats that grab under the lips sitting as overhangs or undercuts facing the bed, and the slicer may want to drop support right there. Support on the gripping face ruins the overlap dimension you took such care over. Orient so that the face that catches the lip comes out clean and support-free, even if you have to accept an overhang somewhere less critical.
Orientation matters even more if your part takes load or torque. A module with weight, or one whose cables get tugged, applies a moment to the clip that tries to peel it off the rail and concentrates precisely at the arm's root and into the layer adhesion of the body. The more load the bracket has to take, the more it matters that the load direction runs along the layers rather than peeling them apart. Orient with an eye on how the part will be pulled once mounted, not just on how it goes onto the bed.
What to print onto the rail
With the clip sorted, the DIN rail becomes a universal mounting rail for your own parts. A bracket that holds a printed module — a board, a converter, a small PCB — and clicks it into the enclosure alongside the breakers. A fuse holder you pull out by hand to change the fuse without dismantling anything. The base of a whole project you want kept tidy and demountable rather than held together with zip ties. In each of them, the part changes; the 35 mm clip is the same, and once you have it measured and oriented, you reuse it.
And if you want to mount your parts on framing rather than inside an enclosure, the workshop's other great standardised rail is the T-slot aluminium extrusion: another standard section, another family of clearances, the same principle of "measure the standard, translate the dimension into an FDM clearance". You'll find it in 2020 aluminium extrusion and V-slot: the channel and its T-nuts. Before you print the first clip, run a tolerance tower on an offcut of your own rail: measure the gap that goes in without forcing and the overlap that holds without rattling, and from there on you're no longer guessing.