Three-dimensional self-assembly of millimetre-scale components