now accomodating any mesh thickness in deform_mesh_to_geometry()