Code-Compliant Excavation