Data-driven design and optimization for additive manufacturing