Centroid to centroid. And if those centroids are at different locations in Y and Z the 3D distance is going to report longer than a caliper which is measuring 2D. If the cylinder axis is parallel to machine X then I'd report 2D and tick parallel to machine X if I wanted to replicate a caliper measurement.