Cleaner logic for perimeters, thin walls and gaps. More correct results and faster processing