fixed error in ray2mesh