D.Core.Envelope: add new 'extent' function and use it in 'diameter'