fixed coordinate logic in mesh generation, but visible face logic still wrong