Design by Composition for Layered Manufacturing