boundary path contains/hole detection