This function seems like it's going to be almost the same for each generator class. (Lines 159-177 are very generic). Would be nice if it could be part of the base MeshGenerator class.