Compute cutting segments, try to deal with edges unsuccessfully.