Code added to cubegeometry.cs and related classes