Improve the alternative nodeAtPoint method algorithm taking account of accumulated zPosition