update algorithm to eliminate edges which are inside specified planes