Structural optimization of 3D printed designs with spatially-varying material properties