Layer-drawing software for a 3D printer