3D Printing Generator
DeutschEnglish

Pipe Fittings and Tube Connectors: Print Your Own

Socket fittings for pipes and tubes

Pipe is cheap, strong and available everywhere: PVC pipe from the hardware store, electrical conduit, aluminum tube, furniture tube. What is hard to find is the right connector, especially when you want a corner with three pipes, a five-way node for a play tent or a flange that screws a post to the floor. This generator prints exactly the fitting you need for exactly your pipe. You enter the outside diameter, the clearance and the socket depth, pick the type, and download an STL.

Everything is computed in your browser, nothing is uploaded, and your settings live in the link of the page, which you can pass on with “Share”. Ready-made designs are in the example gallery, for instance the three-way corner for a greenhouse, the tee for 32 mm pipe or the flange for 25 mm pipe.

Not for pressurized plumbing

Please read this before you print. These fittings carry loads, not liquids. Use them for greenhouse frames, shelves, trellises, play tents, clothes racks, camera rigs, tables and displays. Do not use them for drinking water, hot water, compressed air, gas or anything under pressure. A 3D print has layer lines that leak, it creeps under constant load, and PLA softens at about 55 °C. If a failure could cause damage or injury, buy a certified fitting.

The nine fittings

  • Coupling joins two pipes in a straight line, with a center wall as a stop.
  • Elbow bends the run by 15 to 90 degrees. 90° is the right angle, 45° the gentle bend for braces and rafters.
  • Tee has three sockets, two in line and one to the side.
  • Cross has four sockets in one plane.
  • Corner joins three pipes like a corner of a box: two horizontal and one going up.
  • Tee with riser is a tee plus a fourth pipe going up, the joint for table frames.
  • Hub carries five pipes: four horizontal and one up.
  • End cap closes a pipe with a cup.
  • Flange is a socket on a base plate with two to six screw holes.

There is no socket that points down, on purpose: it would need supports. The five-way hub covers most frames, because gravity usually wants a pipe going up anyway.

Measure the pipe, choose the clearance

Measure the outside diameter with calipers at two places, 90 degrees apart, and enter the larger value. The presets (8, 10, 12, 16, 20, 25, 32, 40, 50 and 63 mm) are nominal values: PVC pressure pipe is exactly 25 mm outside, but cheap conduit or old aluminum tube can be a few tenths off, and a coat of paint adds more.

The clearance is the gap between pipe and socket on each side. It decides how the joint behaves.

ClearanceBore for a 25 mm pipeFeelGood for
0.1 mm25.2 mmtight, needs a malletgluing, permanent joints
0.2 mm25.4 mmslides on by handdefault, with ribs a firm fit
0.3 mm25.6 mmeasy, a little playtaking apart often
0.4 mm25.8 mmlooserough or oval pipes

Every printer makes holes a bit small. If your first test piece is too tight, add 0.1 mm. A test piece is quick: an end cap for 10 mm tube prints in 15 minutes, one for 40 mm pipe in 40 minutes.

Socket depth and wall

The socket depth is how deep the pipe goes in. One to one and a half pipe diameters hold well: 30 mm for 25 mm pipe, 24 mm for 20 mm. Deeper sockets resist bending better; short sockets only suit light loads such as curtain rods or model builds.

The wall around the pipe is 3 mm by default. Thicker walls are stiffer and take set screws; for thin tubes of 8 to 12 mm a wall of 2 to 2.4 mm is enough. The outer radius is the pipe radius plus clearance plus wall, so a 25 mm pipe ends in a 31.4 mm socket.

All pipes in a fitting end at the same distance from its center. The sidebar shows this “end distance”. Cut your pipes to the distance between two centers minus the two end distances and every frame comes out square.

PipeElbow 90°TeeCorner
16 mm9.3 mm9.3 mm9.7 mm
20 mm11.3 mm11.3 mm11.7 mm
25 mm13.8 mm13.8 mm14.2 mm
32 mm17.3 mm17.3 mm17.7 mm
40 mm21.3 mm21.3 mm21.7 mm
50 mm26.3 mm26.3 mm26.7 mm

The values are for the default wall of 3 mm and grow a little with thicker walls.

How it prints without supports

A pipe socket lying on its side has a round ceiling, and a round ceiling is the classic overhang. The generator solves this in two ways.

Sockets that point sideways lie on the bed on a flat foot. The outer shape is a circle with a 45 degree chamfer below it and a pointed roof above it, like a teardrop or a house. The bore has the same pointed roof, so the ceiling of the pipe hole climbs at 50 degrees to the ridge. Nothing overhangs by more than 45 degrees, and the pipe fits the round part exactly. The small gap above the pipe in the roof is only air. The roofs are a little steeper than 45 degrees on purpose: in our tests a slicer sometimes flagged a roof of exactly 45 degrees on tiny sockets.

The socket that points up is a plain pillar that grows from the bed with vertical walls and a round bore. Set screw holes in a sideways socket run straight down from the top; in the upright socket they are teardrop-shaped.

We checked all 15 examples in PrusaSlicer for the Prusa MINI (“0.20mm SPEED”, PLA) with automatic supports switched on, and the slicer created no support layer for any of them. The unit test for this generator also checks that no face looks down steeper than 45 degrees except on the bed.

Ribs, set screws and pins

Ribs are small lengthwise ridges inside the socket, 0.5 mm high by default. They press on the pipe, make up for size errors and let you choose a looser clearance without a wobbly joint. In the sideways sockets they sit in the lower half, so they need no support. For gluing leave them out and use 0.1 to 0.15 mm clearance.

The lock adds a hole in every socket. An M3, M4 or M5 set screw goes in from above (sideways sockets) or from the side (upright socket), and presses on the pipe. The hole is a bit smaller than the thread, so the screw cuts its own thread. Use M4 with a 3 mm wall and M5 with a 4 mm wall; the editor warns when the wall is too thin. A pin hole of your own diameter, from 2 to 8 mm, takes a steel pin, a cotter or a bolt through socket and pipe.

Flange and end cap

The flange is a socket on a round base plate. The plate is 5 mm thick by default and reaches 16 mm beyond the socket. Two to six holes sit in the ring, plain or countersunk for flat-head screws. The countersink opens upward, so it prints without supports. A 45 degree fillet joins plate and socket and makes the joint strong. Use it for handrails, clothes rails, flag poles and posts that stand on a board, a wall or the floor.

The end cap is the same socket with a closed bottom. It protects the open end of a post from water and dirt.

Sizes and print times

All numbers below are from real slices (PrusaSlicer, Prusa MINI, “0.20mm SPEED”, Prusament PLA, default infill):

ExampleSizePLATime
Corner for 25 mm pipe65 × 65 × 65 mm38.7 g1 h 46 min
Elbow for 20 mm pipe52 × 52 × 34 mm19.4 g50 min
Tee for 32 mm pipe105 × 72 × 51 mm57.8 g2 h 08 min
Cross for 16 mm pipe70 × 70 × 27 mm24.0 g1 h 02 min
Five-way hub for 16 mm pipe75 × 75 × 48 mm29.5 g1 h 30 min
Flange for 25 mm pipe63 × 63 × 35 mm17.0 g54 min
Cap for 40 mm pipe46 × 46 × 28 mm13.7 g40 min
Elbow for 8 mm tube25 × 25 × 16 mm3.4 g17 min

The largest fitting is limited by the bed. If a fitting would be larger than 180 mm, the socket depth is reduced and the editor tells you.

Material and print settings

  • PETG is the best choice for greenhouses, gardens and anything outdoors. It tolerates moisture, a little flex and a summer afternoon better than PLA. ASA is the choice for permanent outdoor use with sun.
  • PLA is fine indoors for shelves, racks and tents, but it softens at 55 to 60 °C, so not behind a window in summer and not in a car.
  • Use 4 perimeters and 25 to 30 percent infill. The walls take the load, not the infill.
  • Print in the orientation of the export. Do not rotate the part.
  • Use a 0.2 mm layer height. Thicker layers make the roof rougher; thinner layers only take longer.
  • Clean the bore with a small file or sandpaper if the first layer left a bulge at the edge (elephant foot).

Gluing and assembling

If you want a permanent joint, use a clearance of 0.1 mm and leave the ribs out. Sand the pipe end lightly and use a two-component epoxy or a PU construction glue. PVC cement does not bond PLA or PETG. For joints you want to take apart again, use 0.2 mm, ribs and a set screw, and the frame comes apart with a screwdriver.

Cut pipes square, remove the burr from the end, and push the pipe in until it stops. The stop is the wall at the center of the fitting. With ribs, a drop of dish soap on the pipe end makes pushing in easier.

How it differs from other generators

The tube clamp screws around a pipe and holds it against a wall or a second pipe. The aluminum profile brackets connect T-slot extrusions. The tube end cap closes round, square and rectangular tubes with flexible plugs. This generator is different: it joins round pipes end to end with sockets, in any combination from a straight coupling to a five-way node.

Origin and credits

The geometry of this generator is an original design. The idea of a family of socket connectors for PVC and metric pipes with a fit clearance comes from openscad_pvc by Jon Gilbert (MIT license). We checked its license, but did not take any code, mesh or dimension from it; the teardrop profile, the hub, the ribs, the locks and the flange are newly designed for this site. The license text is on the licenses page.

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 diameter25–Outside diameter of the pipe, measured with calipers.
Clearance0.2–Gap between pipe and socket per side. 0.1 mm is tight, for glue or a press fit. 0.2 mm slides on by hand. 0.4 mm is loose, for pipes that are not quite round.
Socket depth30–How far the pipe goes into each socket. About one to one and a half pipe diameters hold well.
Wall3–Thickness of the socket wall around the pipe. Thicker walls are stiffer and take set screws.
Center wall3–Thickness of the wall between the two pipes in a straight coupling. The pipes cannot slide in further than this wall.
Bend90–How far the pipe changes direction. 90° is a right angle, 45° a gentle bend.
Ribs0–Lengthwise ridges in every socket that press on the pipe and make up for size errors. 0 = smooth bore, best for gluing.
Rib height0.5–How far the ribs reach into the bore. The pipe is squeezed by the height minus the clearance.
Pin diameter4–Diameter of the pin hole.
Plate thickness5–Thickness of the base plate of the flange.
Plate width16–How far the plate reaches beyond the socket. The screw holes sit in this ring.
Screw holes3–Number of screw holes in the plate.
Hole diameter4.5–Diameter of the screw holes. 4.5 mm fits a 4 mm screw.

Frequently asked questions

Can I use these fittings for water pipes?

No. They are made for frames, furniture, greenhouses, trellises, play tents and displays, where pipes only carry weight. The sockets are printed layer by layer, they are not watertight, and a printed part does not survive water pressure, hot water or gas. The editor shows a notice for this on every fitting.

Which clearance should I choose?

Start with 0.2 mm, the default. That slides on by hand and still sits firmly with a few ribs. Take 0.1 mm if you want to glue the pipe or press it in with a mallet. Take 0.3 to 0.4 mm if the pipe is slightly oval, rough or coated, or if your printer makes holes a bit too small. A small test cap takes 15 to 40 minutes and 2 to 14 g of filament and settles it.

Do I need supports?

No. Sockets that point sideways get a 45 degree foot and a pointed roof, and the socket pointing up is a straight pillar. We sliced all 15 examples with automatic supports switched on (PrusaSlicer, Prusa MINI, “0.20mm SPEED”) and the slicer did not generate a single support layer. Print the fitting in the orientation it is exported in; turning it onto its side would create overhangs.

Why is there no six-way hub or a socket that points down?

A socket that points down would have to be printed with its opening on the bed, and the round ceiling above the bore would need supports. For a six-way node use the five-way hub and a short stub pipe, or glue two corners together. Everything this generator offers prints without supports.

How do I lock a pipe so it cannot slide out?

Under Ribs and lock you can add a hole in every socket for an M3, M4 or M5 set screw, or for a pin of your own diameter. The screw hole is a little smaller than the thread so the screw cuts its own thread in the plastic. For M4 keep the wall at 3 mm or more, for M5 at 4 mm. Metal pins or a cotter through the pipe work too.

How do I cut the pipes to the right length?

All pipes end at the same distance from the center of the fitting. The sidebar shows it: a 25 mm elbow has 13.8 mm, a corner 14.2 mm. For a straight run between two fittings the pipe length is the distance between their centers minus the two end distances. That way equal frames come out equal, and you can cut all pipes to the same length.

Origin & license

  • openscad_pvc by Jon Gilbert · MIT · idea – idea (a family of socket connectors for PVC and metric pipes with a fit clearance: elbow, tee, corner, cross, multi-way hub, coupling, cap, flange); only the LICENSE was checked, the geometry is newly designed, no code or dimensions copied