measureVolume = (...geometries) => {
  geometries = flatten(geometries)
  if (geometries.length === 0) throw new Error('wrong number of arguments')

  const results = geometries.map((geometry) => {
    if (path2.isA(geometry)) return measureVolumeOfPath2(geometry)
    if (geom2.isA(geometry)) return measureVolumeOfGeom2(geometry)
    if (geom3.isA(geometry)) return measureVolumeOfGeom3(geometry)
    return 0
  })
  return results.length === 1 ? results[0] : results
}
Measure the volume of the given geometries.
@param {...Object} geometries - the geometries to measure
@return {Number|Array} the volume, or a list of volumes for each geometry
@alias module:modeling/measurements.measureVolume

@example
let volume = measureVolume(sphere())