Add diameter variable to the sphere, cylinder and circle primitives.

This fixes issue #392 which asks for the feature to define primitives based on diameter instead of radius.