And of course as often happens, I remembered something I wanted to say
just as I hit Send...
I know of two ways to truly measure from one point to another, both
severely restricted.
1) You can replace the transformation primitives with ones that pass
the accumulated transformation down the call tree. From the bottom of
the call tree, you can then have access to both a coordinate from higher
in the call tree, and a coordinate from the current place in the call
tree. That is, if you have a module A that calls B and C, you can
measure from a point in A to a point in either B or C, but not from a
point in B to a point in C. Ref
http://forum.openscad.org/Some-thoughts-on-deriving-world-coordinates-for-objects-td30377.html
, which doesn't explicitly provide such a measurement but does do such
a measurement as part of its demonstration. (Note the arrow from the
label to the orbiting cube; its length had to be calculated.)
2) You could do all of your geometry "in user space", in arrays of
points. You could then do whatever you want, but you're losing all of
OpenSCAD's own geometry processing, except for the final rendering.