fixed mesh padding calculation