The increasing variety of products and variants requires a flexible and fast path generation in robot-based painting processes. In the state of the art, path generation in the painting industry is a time-consuming and cost-intensive iteration process in which the generated paths are evaluated and optimized via painting trials. In this paper, we present a concept for a self-programming painting cell, which is based on the key technologies 3D-scanning, multi-physics painting simulations, and a contactless film thickness measurement using terahertz technology. The core-element of this cyber-physical painting system is a unique combination of numerical painting simulations with a gradient-based multi-objective optimization method, which virtually computes painting paths utilizing a CAD model fitted onto the point cloud of the scanned workpiece. In order to drastically reduce the time and computationally intensive numerical fluid dynamic simulations, a step-by-step coupling of an offline and online simulation was implemented. In a final step, a guaranteed collision-free robot motion without singularities is generated automatically from the painting path. The concept was validated under pilot plant conditions by the painting of a fender using electrostatically assisted high-speed rotary bell atomizer based on the measured paint film thickness. The coating thickness, measured with terahertz radiation was used as the target and validation criterion, as it shows a strong correlation to other quality values. The results show that the achieved film thickness was within the process specification, although deviations between simulated and measured film thicknesses were found in the edge zones of the workpiece. The self-programming painting cell »Self-Paint« was successfully validated conceptually under pilot plant conditions. However, process integration of »Self-Paint« is still limited in the process planning itself since prerequisites for working with optical devices, as well as a time window for the calculation of painting paths, must be taken into account.