The truncated octahedron is a shape that has the interesting property that it can tessellate an entire 3D space so that any two solids that meet by an edge or corner also meet by a face, in a configuration called the bitruncated cubic honeycomb.
This gives it the special property that there is only one metric for adjacency distance [unlike a cubic grid where two cubes touching by only a corner have a face distance of 3], a property which is shared by a hexagonal grid in two dimensions.
Any solid in the bitruncated cubic honeycomb can be represented by the 3D coordinates
(a+h, b+h, c+h) where
a, b, c are integers and
h is either 0 or 1/2. Any solid at
(x, y, z) is adjacent to the solids at the following locations:
x, y, z+1 x, y, z-1 x, y+1, z x, y-1, z x+1, y, z x-1, y, z x+1/2, y+1/2, z+1/2 x+1/2, y+1/2, z-1/2 x+1/2, y-1/2, z+1/2 x+1/2, y-1/2, z-1/2 x-1/2, y+1/2, z+1/2 x-1/2, y+1/2, z-1/2 x-1/2, y-1/2, z+1/2 x-1/2, y-1/2, z-1/2
Your task is to build a program that, given the locations of two truncated octahedrons in the above arrangement, finds their distance. You can take input in any format you wish.
The shortest code to do this in any language wins.