3D Printing Generator
DeutschEnglish

3D printing a pipe clamp: size, bolts, stacking

A clamp for any pipe

A 3D printed pipe clamp is one of the most useful things you can make yourself. It holds pipes and conduit on a wall, joins tubes into shelves and frames, mounts a light on a handlebar or turns a few aluminum tubes into a stand for a raised garden bed. Hardware stores sell clamps, of course, but rarely in exactly the size you need, and almost never in a shape you can stack.

This generator builds a classic two-part clamp: two identical halves with a half-round trough that wrap the pipe from above and below. One bolt on each side pulls the halves together. The footprint is a rounded slot shape, and the top and bottom are flat. Those flat backs are what makes this clamp special: you can put clamps on top of each other and join pipes at a right angle or side by side.

So that the bolts really clamp, both halves together are a few percent lower than the full clamp. With the pipe inside, a narrow gap stays between the halves. Tighten the bolts and the gap closes while the trough presses around the pipe, much like a handlebar clamp on a bike. Without the gap the halves would meet before the pipe is held, and it could still slip.

You always download complete clamps: each clamp is two halves on the plate, both lying on their backs. With “Number of clamps” you get several pairs at once, laid out compactly.

Measuring pipe and bolts

The key size is the outer diameter of the pipe. Measure it with calipers in two or three places, since plastic pipes in particular are rarely perfectly round. Common pipes are in the preset list, which fills in the diameter:

PipeOuter diameter
Copper pipe (water, heating)15, 18, 22, 28 mm
Electrical conduit (metric)M16, M20, M25, M32 = 16, 20, 25, 32 mm
Drain pipe (European HT)DN 30 = 32 mm, DN 40 = 40 mm, DN 50 = 50 mm
Aluminum tube20, 25, 30 mm
Scaffold tube48.3 mm
Steel pipe by inch size1/2" = 21.3 mm, 3/4" = 26.9 mm, 1" = 33.7 mm
PVC pipe Schedule 403/4" = 26.7 mm, 1" = 33.4 mm
Bike handlebar22.2 mm (grip area), 25.4 mm, 31.8 mm (clamp area)

A word on inch pipe: the inch size is a nominal size, not the outside. A 1/2 inch steel pipe measures 21.3 mm across, not 12.7 mm. When in doubt, trust your calipers.

The bore is made a little larger than the pipe, 2 % by default. That is snug but still goes together when your printer prints slightly fat. For a handlebar that must not move you can lower the clearance to 1 %; for rough or oval pipes give it a bit more.

For the bolts you pick the nominal size: M3 to M10 or the imperial sizes #8, #10, 1/4", 5/16" and 3/8". The hole gets 10 % clearance. Pipes up to about 20 mm are fine with M3 or M4, 25 to 40 mm with M5 or M6, and scaffold tube or large drain pipe with M8. The bolts sit outside the trough in the rounded ends of the clamp; the material around each hole follows the minimum wall.

Nut traps and bolt head recesses

“Nuts and heads” adds pockets to the back. With “Nut”, one half of every clamp gets a hex pocket that stops the nut from turning. With “Head”, the other half gets a round recess that swallows socket and hex heads. “Both” combines the two, so nothing sticks out on either side and the clamp looks tidy. Because the pockets open on the bed side, the generator prints two thin bridging layers above them (the well-known hole bridging trick), so the printer gets across without supports.

Stacking: cross and parallel connectors

The flat backs are the whole idea behind this clamp. Two uses stand out:

Joining crossing pipes. Put two clamp pairs back to back, turned by 90°. To hold them together there is the center screw: a hole through the bottom of the trough, with a countersink for a flat head screw in one half and a pocket for the nut in the other. Head and nut sit a few tenths below the bottom of the trough so the pipe doesn’t press on them. The generator tells you the length of the countersunk screw so that its end comes out flush with the nut. Important: fit this screw before the pipes go in, because you can’t reach it afterwards. The other two halves have the same hole and don’t mind it; with the countersink you can also screw a half straight to a wall or a board.

Stacking parallel pipes. If several pipes run on top of each other, every clamp needs the same footprint and the same bolt holes. That is what “Footprint of a pipe” is for, called the virtual pipe diameter in the original. Enter the diameter of the thickest pipe for every clamp. A clamp for a 20 mm pipe with the footprint of a 32 mm pipe is then exactly as wide and long as the 32 mm clamp, and its bolt holes line up. Long bolts or threaded rod hold the whole stack together through all layers. At 0 the footprint simply follows the pipe.

The height of each clamp still follows its own pipe, so the wall around the thin pipe is just as strong as in a normal clamp.

Printing and strength

Each half lies on its flat back with the trough facing up. There are no overhangs and you need no supports. A few tips for clamps that last:

  • Material: PLA is fine indoors away from heat, for conduit in the workshop for example. Outdoors, in the sun or on warm heating pipes, use PETG or ASA. PLA softens from about 50 °C and creeps under a constant load.
  • Walls, not infill: the bolt force runs through the outer walls. Four to five walls with 30 to 40 % infill are stronger than two walls with 100 % infill.
  • Layer height: 0.2 mm works well. The trough prints in layers and comes out slightly stepped, which doesn’t hurt the grip at all.
  • Wall thickness: the minimum wall is 5 mm and grows with thick pipes (1/16 of the diameter). Raise it for heavy loads or thin bolts.
  • Large pipes: from about 80 mm the clamps get big and heavy and take long to print. A clamp for a 120 mm pipe no longer fits small beds, and the generator warns you.

For pipes that must not turn or slide, a thin strip of rubber or old bike inner tube in the trough is a proven trick. Give the pipe a little more clearance then (3 to 4 %).

Assembly

  1. Check the bolt length: the generator shows the minimum length and a matching stock length. It takes both halves, the nut, a washer and any pockets into account.
  2. Fit the nuts: press them into the hex pockets. If they are too tight, push them in with a bolt or a warm soldering iron.
  3. Put the pipe in, add the second half and tighten the bolts evenly in turns, gently first, then firmly.
  4. Don’t overtighten: plastic gives. Once the gap between the halves is almost closed, the clamp holds. Tightening further only crushes the walls around the bolts. Use washers when you don’t have head recesses.

With stacked clamps, work from the inside out: set the center screw or the long through bolts loosely first, then put the pipes in, then tighten everything evenly.

Origin & license

This generator is based on the “Customizable Stackable Tube/Pipe Clamp (UPDATED!)” by Bob Cunningham (BobCc), published under CC BY 4.0. The shape of the clamp, the clearances for pipe, bolt and clamping gap, the wall thickness rule and the virtual pipe diameter for stacking come from there. The geometry was ported from the OpenSCAD original to TypeScript and checked against it with a parity test.

What we changed: the original accidentally drills the bolt holes with the diameter as the radius, so the holes were twice as large as intended; here they are fixed (bolt hole = bolt plus 10 %). Wall and height are worked out per clamp from its own pipe. New are nut traps, head recesses, the center screw for cross connectors, several clamps per plate and the presets for common pipe and bolt sizes.

All parameters

The numeric settings of the generator with their default values and allowed ranges. Text, fonts, patterns and colors are set directly in the generator.

ParameterDefaultRangeMeaning
Pipe
Pipe diameter50.8 mm5 – 160 mmOuter diameter of the pipe, measured with calipers.
Bolts
Bolt diameter6.35 mm2 – 12 mmNominal diameter of the bolt, so M6 = 6 mm.
Stacking
Footprint of a pipe0 mm0 – 160 mmFor parallel stacks: give every clamp the diameter of the thickest pipe and they share one shape and the same bolt holes. 0 = same as the pipe.
Fit
Pipe clearance2 %0 – 8 %The bore is this many percent larger than the pipe. 2 % is snug but not tight.
Bolt clearance10 %0 – 30 %The hole is this many percent larger than the bolt. 10 % assembles easily.
Clamping gap5 %0 – 10 %Both halves together are this many percent of the height shorter. The gap lets the bolts pull the clamp tight.
Wall and count
Minimum wall5 mm2 – 12 mmThe thinnest wall of the clamp. For thick pipes it grows with them (1/16 of the diameter).
Number of clamps11 – 6This many clamps, two halves each, go on the print plate.

Frequently asked questions

What is the “footprint of a pipe” (virtual pipe diameter)?

It sets the clamp’s footprint. Give every clamp of a stack the value of the thickest pipe and they share one shape and the same bolt holes, so long bolts can go through all layers.

Why is there a gap between the halves?

Together they are 5 % shorter than the full clamp, so the bolts pull them tight around the pipe instead of the halves bottoming out before the pipe is clamped.

Which material is best?

PETG or ASA outdoors and near heat, PLA indoors. More walls (4–5) add more strength than more infill.

How do I join two crossing pipes?

Turn on the center screw and put two clamp pairs back to back. The countersunk screw goes through the half with the countersink, the nut sits in the pocket of the other half. Tighten it before the pipes go in.

How long must the bolts be?

At least as long as the clamped-together clamp plus nut and washer. The generator works the length out and suggests a matching stock length.

Do I need supports?

No. Each half lies on its flat back with the trough facing up. Nut traps on the back are covered by two bridging layers.

Origin & license