Smarter 3D printing