added a calc extents and another grid generation method to mesh_class