It is often necessary to connect multiple 3D-printed parts together, either to allow one of the parts to rotate, or due to limitations in the printing process such as build size, preventing overhangs, or printing in multiple materials. These pins allow you to do that fairly easily when designing the parts, often not ever needing to glue anything (although you can use glue as well, if you want to ensure it will never come apart...)
I have included three different sizes of pin, and the ability to create almost any sized custom pins as well. The standard pins are about 25mm long, with a socket diameter of 7mm, while the small are about half that size, and the tine are as small as I can make them reliably.
Optionally, you can give the pins (and sockets) rounded ends, which shortens them slightly for the same strength, but I think the points increase the alignment stability.
This is modified from Emmett's rather excellent pin connectors: https://www.thingiverse.com/thing:213310. I had been intending to design something very similar to this, and then found it had been done already :-)
The main change to this is the addition of further parameterisation, which allows a much wider range of size to be specified, as a number of people have been looking for a way to make the pins much smaller.
STL files for the pin and socket, both fixed and free, are included for three sizes. The one named pin-round-standard should be compatible with Emmet's, and should fit in the same sockets, although it's own socket is shorter. The small is my original small pin size, and the tiny is about as small as I have tried to make it so far, although smaller is probably possible...
(Note as of 2018-11-18: I made some very minor changes in how the preload works today)
I have again heavily refactored this from my previous version( https://www.thingiverse.com/thing:3210316 ), to add support for both rounded and pointed pins, and to allow it to work with the customiser. Rounded pins allow them to be shorter for a given size and strength, but pointed one are probably more stable in the holes.
For the pins, they are small enough that the infill probably doesn't matter, they are all walls. For the sockets, you probably want at least 3 walls in the part you put the socket into for strength. I recommend disabling "Fill gaps between walls" and "Filter out tiny gaps", and enabling "Print thin walls" when printing smaller sizes of pins. The standard pin should work fine on default settings (0.20 layer height)
You can use the pin STL files directly, they are designed to print flat. Be careful of your print settings with smaller pins, slicers default settings are often not friendly to small, skinny parts.
The sockets are a little more complicated to use. The socket STL is a negative space which is subtracted from the shape you are embedding it in, the origin of the STL file is the centre point of the hole in the surface. I designed it so that the socket extends 0.1mm past the surface to ensure that the resulting shape doesn't have any leftover artefacts. For each size there is both a fixed and a free STL file. IF you want a joint that can rotate, use a fixed socket on one side and a free one on the other, if you want it to not rotate, then use two fixed sockets. You could use two free sockets if you want it to rotate as well, but it is more stable with one side fixed.
You can use white lithium grease on the pins as well, although I haven't found it necessary.
Round pin and sockets
Pointed pin and sockets