Simulation of Pre processing for 3D printing