compareBoundaryPoints