InverseCSG: Automatic Conversion of 3D Models to CSG Trees


While computer-aided design is a major part of many modern manufacturing pipelines, the design files typically generated describe raw geometry. Lost in this representation is the procedure by which these designs were generated. In this paper, we present a method for reverse-engineering the process by which 3D models may have been generated, in the language of constructive solid geometry (CSG). Observing that CSG is a formal grammar, we formulate this inverse CSG problem as a program synthesis problem. Our solution is an algorithm that couples geometric processing with state-ofthe-art program synthesis techniques. In this scheme, geometric processing is used to convert the mixed discrete and continuous domain of CSG trees to a pure discrete domain where modern program synthesizers excel. We demonstrate the efficiency and scalability of our algorithm on several different examples, including those with over 100 primitive parts. We show that our algorithm is able to find simple programs which are close to the ground truth, and demonstrate our method's applicability in mesh re-editing. Finally, we compare our method to prior state-of-the-art. We demonstrate that our algorithm dominates previous methods in terms of resulting CSG compactness and runtime, and can handle far more complex input meshes than any previous method.


Paper and Code

InverseCSG: Automatic Conversion of 3D Models to CSG Trees
Tao Du, Jeevana Priya Inala, Yewen Pu, Andrew Spielberg, Adriana Schulz, Daniela Rus, Armando Solar-Lezama, Wojciech Matusik
ACM Transactions on Graphics (SIGGRAPH Asia 2018)
[Paper] [Code]


    author = {Du, Tao and Inala, Jeevana Priya and Pu, Yewen and Spielberg, Andrew and Schulz, Adriana and Rus, Daniela and Solar-Lezama, Armando and Matusik, Wojciech},
    title = {InverseCSG: Automatic Conversion of 3D Models to CSG Trees},
    year = {2018},
    issue_date = {December 2018},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    volume = {37},
    number = {6},
    issn = {0730-0301},
    url = {},
    doi = {10.1145/3272127.3275006},
    journal = {ACM Trans. Graph.},
    month = {dec},
    articleno = {213},
    numpages = {16},
    keywords = {procedural modeling, CAD, CSG}