While a powder bed 3D printer device is easy to use, the cleaning task after each print is a tedious job. Consequently, a proper approach is to employ an industrial robot for this task. The robot should be programmed quickly and efficiently with the off-line robot programming (OLP) method. In this paper, an OLP system based on Python and OpenCasCade libraries is introduced to generate robot trajectories for cleaning the printer powder bed immediately and autonomously. The cleaning operation is divided into three sub-operations: top layer raster, raster from the offset, and offset oriented. Several algorithms are employed to satisfy sub-operations autonomously from a CAD model. Raster path, wire, and yaw angle calculators are essential algorithms. Finally, a graphical simulation illustrates the operation efficiency. The proposed system can generate a cleaning path immediately and due to utilizing open resource libraries, there is a wide range of applicable personalization.