Wednesday, January 9, 2019

InverseCSG recovers CAD from model


The MIT Computational Fabrication Group has a page up with the abstract and links to the paper and video. The InverseCSG folks took a program synthesis approach to enable them to generate CAD boolean operation "programs" from the 3D model "specification."


The method seems pretty robust. It can handle noise in the input mesh, and it will approximate the input mesh with primitives that it knows even if the mesh was generated by primitives that it does not.

The github repository for InverseCSG is empty (email with the author said they are still planning on posting it after some tiddying up of the code), but a snapshot of the code is available in the source material on the ACM digital library site. I had no trouble getting the code to compile on Fedora 29. You'll also need to install sketch by following the instructions, and make sure Maven and Scikit Learn are installed (likely packages are available for your distro).

I ran the example as it suggested in the README

python3 run_tests.py ../build/ one_cube

You'll need to comment out line 7 in main.py:

#import genetic_algorithm_pipeline

This little bit of code clean up should be taken care of if you get the version off the github site once it goes live. With that small fix the test cases run as expected.
One Cube Test Case OpenSCAD results


One of the other interesting things about this work is that they built a 50 CAD model benchmark data set. It will be cool to see if more researchers take up this benchmark to test new and improved algorithms. As it says in the README you can browse through the benchmark database in the example folder, and open up the results in OpenSCAD.

Other coverage:

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Great job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Thank you because you have been willing to share information with us. Best CAD Drafting Services USA

    ReplyDelete