working distance calc in local_tangent_plane, but workaround for local_pos_sp, cur does not work propperly