InverseCSG: Auomaic Conversion o 3D Models o CSG Trees

•

213:3

Schulz et al. [ 2017] use parametric CAD models or abrication- oriented design optimization. These recent works argue that the advan tage o directl y using CAD models over algorithm s or au- tomatic parametrization o an input 3D mesh [ Bokeloh et al

2011 ] include: (1) greater and more

meaningul geometric variations (as opposed to some dimensions)

and (2) automatic exposure o relational constraints that can be used

to understand unction and support multiple abrication methods. In these works, however, the parametric models are taken as an

input and assumed to be careully specifed by expert engineers.

There has been some recent work on extracting editable 3D struc- tures or revealing constraints rom input that does not contain CAD structure. Chen et al. [ 2013 ] allow geometric re-editing rom images. Similarly, Xu et al. [ 2016 ] propose an interactive method or extract- ing unctional inormation o mechanisms rom multi-view images. In both o these techniques, however, detailed user sketches are used to extract inormation on the shape components and their relations.

In this work, we propose a method or automatically generating a

CSG tree rom a shape without any additional user assistance. This approach identifes the ull structure and provides a plausible means

by which the geometry could have been instantiated.

Inverse Procedural Modeling.

The problem o recovering the list o geometry procedures that reconstruct a 3D shape is a special case o inverse procedural modeling. Over the years, two primary strategies

have been developed or tackling this domain. Recognition-based strategies attempt to discover certain attributes o the underlying

shape, such as classifed geometry or segmentations [Fish et al

2017 ] in order to estimate the in- put’s structure. These techniques are typically based o machine learning techniques or geometrically principled rules. While ast, they provide limited insight o a shape’s underlying structure and

can be dicult to debug. On the other hand, search-based strategies

attempt to ully explain the input shape by sampling-based meth-

2016] . Since search must be applied to each input geometry, these methods are

typically slower; however, the act that they return the geometry’s

underlying structure typically makes them more inormative and robust. Our approach borrows techniques rom both: we semanti-

cally segment our input geometry using recognition and then rely

on program synthesis methods which take a direct-search approach

or solving constraints.

Reverse Engineering CAD.

Reverse engineering a CAD model is a classic research problem in the CAD community. The input to

this problem is typically a shape represented as a surace mesh or a

point cloud, and the output is a solid 3D model that can be used in

CAD sotware or urther operations. Central to this problem is the step that converts a boundary representation (B-rep) o a mesh into

a CSG model. [ Shapiro and V ossler 1991] frst proposed a method

to solve the general problem o converting a b-rep into CSG models

using halspaces, and lots o improvements have been proposed in

research attempts to solve the problem in a

deductive

manner: given

a set o surac e patches on the mesh, the method tries to fnd the correct combination o them by applying a series o rules,

e.g.

, i a halplane ully encloses the input shape then the solution can be

represented as an intersection o this halspace and everything else let. As a result, the qualit y o the solution is greatly shaped by the

set o rules one can fnd to apply. Our method is in sharp contrast

to previous work in that we ormulate a search problem that allows

a modern program synthesizer to explore a much larger space and

solve much larger-scale examples than in previous work.

Anoth er amily o approa ches to reve rse engineering a model is evolutionary algorithms. Some attempts have been made to use genet ic algorithms to optim ize a CSG tree such that certain con- straints are satisfed [Hamza and Saitou 2004; Weiss 2009 ]. More

recent work [ Fayolle and Pasko 2016 ] considered the possibility o

taking a B-rep as input to the evolutionary algorithm. The output

o their method is a CSG tree that closely approximates the surace

boundary. One bottleneck o evolutionary algorithms is their long

runtime and large consumption o computational resources. Further ,

their non-deterministic nature makes it hard to control and under-

stand their b ehavior throughou t the optimization. By comparison,

although our method also searches a large space, the search is much more directed; the constraint solver is able to take advantage o the structure o the constraints to prune large sections o the space and

converge to a solution much aster.

There are two concurrent papers that attempt to solve the similar problem but rom dierent perspectives: the CSGNet paper [Sharma

2018 ] trains a neural network that takes as input a 2D or 3D shape and outputs a CSG progra m. Compared to their work, our

method does not require a training dataset and we demonstrate our algorithm on 3D shapes o much higher complexity . Wu et al. [2018]

reconstruct a CSG tree rom raw point clouds by extracting the primitives and inerring CSG tree structures. When building the CSG tree, they divide the bounding box into voxels and label each voxel as inside or outside the point cloud. A CSG tree is then built

in a bottom-up manner by solving an energy minimization problem based on the labels o each voxel. Our work shares a similar pipeline butdoes not req uir e dis cre tiz ing theinput s int o vox els , whi ch all ow s

us to handle inputs with details at various levels.

Program Synthesis.

The feld o program synthesis also has a long history [Alur et al

2017] . There have

been several approaches to program synthesis including constraint- based search [ Solar-Lezama et al

2014 ]. In addition, there are program synthesis systems that are specifcally targeted to some domains. For example, Gulwani et al. [ 2011 ] use a specialized

algorithm to learn string transormation programs very eciently.

Deductive synthesis techniques also have a long history in the program synthesis space, including a number o recent success

stories [ Delaware et al

2004] . These techniques generall y scale well because they break the synthesis problem into small local reasoning steps. It can, however, be dicult to engineer