Merge: geometry: implement 3D `dist` and improve API