Fix error of duplication of idxFace in sampling process. Rewrite ICH/SVG distance functions