Optimization of polyhedral terrains door