The LEGO bricks are precisely designed to fit perfectly together. There is a 0.2mm gap between bricks next to each other. The gap between two bricks stacked on top of each depends on how careful to pressed them down. Of course there are several websites that show you the exact measurements, but some of them were a bit confusing or even broken.
LEGO 2×4 Brick (3001)lego-2×4-brick-dimensions-measurements-3001
LEGO 2×4 Plate (3020)lego-2×4-plate-dimensions-measurements-3020
LEGO 1×4 Technic Brick (3701)
The technic bricks have a hole in the side for pin connectors or axles to go through. I had to cut open a brick to get the exact design of the inside tubes right. The model is available at GrabCAD and the PDF file from here.lego-1×4-technic-brick-dimensions-measurements-3701