While optimizing designs for fabrication is a long-standing and well studied engineering problem, the vast majority of the work in this area assumes that there is a unique map from a design to a fabrication plan. In reality, however, many applications allow for multiple fabrication alternatives. Consider, for example, the model shown in Figure 1 where different fabrication plans trade off material cost and fabrication time. In this context, fabrication-oriented design optimization becomes even more challenging, since it requires exploring the landscape of optimal fabrication plans for many design variations. Every variation of the original design (Figure 1) determines a new landscape of fabrication plans with different cost trade-offs. Designers must therefore navigate the joint space of design and fabrication plans to find the optimal landscape of solutions.
In this work, we present a novel approach that simultaneously optimizes both the design and fabrication plans for carpentry. Prior work represents carpentry designs and fabrication plans as programs [Wu et al., 2019] to optimize the fabrication plan of a single design at a time. Our approach also uses a program-like representation, but we jointly optimize the design and the fabrication plan.
Our problem setting has two main challenges. First, the discrete space of fabrication plan alternatives can vary significantly for each discrete design variation. This setup can be understood as a bi-level problem, characterized by the existence of two optimization problems in which the constraint region of the upper-level problem (the joint space of designs and fabrication plans) is implicitly determined by the lower-level optimization problem (the space of feasible fabrication plans given a design). The second challenge is that there are multiple conflicting fabrication objectives. Plans that improve the total production time may waste more material or involve less precise cutting operations. Our goal is therefore to find multiple solutions to our fabrication problem that represent optimal points in the landscape of possible trade-offs, called the Pareto front. Importantly, the different fabrication plans on the Pareto front may come from different design variations. The complexity of the bi-level search space combined with the need for finding a landscape of Pareto-optimal solutions makes this optimization challenging.
We propose a method to make this problem computationally tractable in light of the challenges above. Our key observation is that there is redundancy on both levels of the search space that can be exploited. In particular, different design variations may share similar subsets of parts, which can use the same fabrication plans. We propose exploiting this sharing to encode a large number of design variations and their possible fabrication plans compactly. We use a data structure called an equivalence graph (e-graph) [Nelson, 1980] to maximize sharing and thus amortize the cost of heavily optimizing part of a design since all other design variations sharing a part benefit from its optimization.
E-graphs have been growing in popularity in the programming languages community; they provide a compact representation for equivalent programs that can be leveraged for theorem proving and code optimization. There are two challenges in directly applying to design optimization under fabrication variations, detailed below.
First, the different fabrication plans for a given design are all semantically equivalent programs. However, the fabrication plans associated with different design variations, in general, are not semantically equivalent, i.e., they may produce different sets of parts. This makes it difficult to directly apply traditional techniques which exploit sharing by searching for minimal cost, but still semantically equivalent, versions of a program. One of our key technical contributions is therefore a new data structure for representing the search space, which we call the Bag-of-Parts (BOP) E-graph. This data structure takes advantage of common substructures across both design and fabrication plans to maximize redundancy and boost the expressive power of e-graphs.
Second, optimization techniques built around e-graphs have adopted a two stage approach: expansion (incrementally growing the e-graph by including more equivalent programs111In the programming languages literature, this is known as equality saturation.) followed by extraction (the process of searching the e-graph for an optimal program). In particular, the expansion stage has not been feedback-directed, i.e., the cost of candidate programs has only been used in extraction, but that information has not been fed back in to guide further e-graph expansion. A key contribution of our work is a method for Iterative Contraction and Expansion on E-graphs (ICEE). Because ICEE is feedback-directed, it enables us to effectively explore the large combinatorial space of designs and their corresponding fabrication plans. ICEE also uses feedback to prune the least valuable parts of the e-graph during search, keeping its size manageable. Further, these expansion and contraction decisions are driven by a multi-objective problem that enables finding a diverse set of points on the Pareto front.
We implemented our approach and compared it against prior work and against results generated by carpentry experts. Our results show that ICEE is up to faster than prior approaches while achieving similar results. In some cases, it is the only approach that successfully generates an optimal set of results due to its efficiency in exploring large design spaces. We showcase how our method can be applied to a variety of designs of different complexity and show how our method is advantageous in diverse contexts. For example we achieve 25% reduced material in one model, 60% reduced time in another, and 20% saved total cost in a third when assuming a carpenter charges $40/h, when compared to a method that does not explore design variations.
2. Related Work
Optimization for Design and Fabrication
Design for fabrication is an exciting area of research that aims to automatically achieve desired properties while optimizing fabrication plans. Examples of recent work include computational design of glass façades [Gavriil et al., 2020], compliant mechanical systems [Tang et al., 2020], barcode embeddings [Maia et al., 2019], and interlocking assemblies [Wang et al., 2019; Cignoni et al., 2014; Hildebrand et al., 2013], among many others [Bickel et al., 2018; Schwartzburg and Pauly, 2013]. Fabrication considerations are typically taken into account as constraints during design optimization, but these methods assume that there is an algorithm for generating one fabrication plan for a given design. To the best of our knowledge, no prior work explores the multi-objective space of fabrication alternatives during design optimization.
There is also significant literature on fabrication plan optimization for a given design under different constraints. Recent work includes optimization of composite molds for casting [Alderighi et al., 2019], tool paths for 3D printing [Zhao et al., 2016; Etienne et al., 2019], and decomposition for CNC milling [Mahdavi-Amiri et al., 2020; Yang et al., 2020]. While some of these methods minimize the distance to a target design under fabrication constraints [Zhang et al., 2019; Duenser et al., 2020], none of them explores a space of design modification to minimize fabrication cost.
In contrast, our work jointly explores the design and fabrication space in the carpentry domain, searching for the Pareto-optimal design variations that minimize multiple fabrication costs.
Design and Fabrication for Carpentry
Carpentry is a well-studied domain in design and fabrication due to its wide application scope. Prior work has investigated interactive and optimization methods for carpentry design [Umetani et al., 2012; Koo et al., 2014; Song et al., 2017; Garg et al., 2016; Fu et al., 2015]. There is also a body of work on fabrication plan optimization [Yang et al., 2015; Koo et al., 2017; Leen et al., 2019; Lau et al., 2011]. Closest to our work is the system of Wu et al. , which represents both carpentry designs and fabrication plans as programs and introduces a compiler that optimizes fabrication plans for a single design. While our work builds on the domain specific languages (DSLs) proposed in that prior work, ours is centered on the fundamental problem of design optimization under fabrication alternatives, which has not been previously addressed.
Bi-Level Multi-Objective Optimization
Our problem and others like it are bi-level, with a nested structure in which each design determines a different space of feasible fabrication plans. The greatest challenge in handling bi-level problems lies in the fact that the lower level problem determines the feasible space of the upper level optimization problem. More background on bi-level optimization can be found in the book by Dempe , as well as review papers by Lu et al.  and Sinha et al. .
Bi-level problems with multiple objectives can be even more challenging to solve [Dempe, 2018]. Some specific cases are solved with classical approaches, such as numerical optimization [Eichfelder, 2010] and the -constraint method [Shi and Xia, 2001]2000]2006]. These methods apply a heuristic search to both levels in a nested manner, searching over the upper level with NSGA-II operations, while the evaluating each individual call in a low-level NSGA-II process [Deb and Sinha, 2009]. Our ICEE framework also applies a genetic algorithm during search. Different from past techniques, ICEE does not nest the two-level search but rather reuses structure between different upper-level feasible points. ICEE jointly explores both the design and fabrication spaces using the BOP E-graph representation.
An is an efficient data structure for compactly representing large sets of equivalent programs. E-graphs were originally developed for automated theorem proving [Nelson, 1980], and were first adapted for program optimization by Joshi et al. . These ideas were further expanded to handle programs with loops and conditionals [Tate et al., 2009] and applied to a variety of domains for program optimization, synthesis, and equivalence checking [Stepp et al., 2011; Willsey et al., 2021; Nandi et al., 2020; Panchekha et al., 2015; Wu et al., 2019; Wang et al., 2020; Premtoon et al., 2020].
Recently, have been used for optimizing designs [Nandi et al., 2020], and also for optimizing fabrication plans [Wu et al., 2019], but they have not been used to simultaneously optimize both designs and fabrication plans. Prior work also does not explore feedback-driven expansion and contraction for managing large optimization search spaces.
In this section, we introduce some mathematical preliminaries used in the rest of the paper.
3.1. Multi-Objective Optimization
A multi-objective optimization problem is defined by set of objectives that assign a real value to each point in the feasible search space . We choose the convention that small values of are desirable for objective .
As these objectives as typically conflicting, our algorithm searches for a diverse set of points that represent optimal trade-offs, called Pareto optimal [Deb, 2014]:
Definition 3.1 (Pareto optimality).
A point is Pareto optimal if there does not exist any so that for all and for at least one .
We use to denote the concatenation . Pareto optimal points are the solution to the multi-objective optimization:
The image of all Pareto-optimal points is called the Pareto front.
Genetic algorithms based on non-dominated sorting are a classic approach to multi-objective optimization [Deb et al., 2002; Deb and Jain, 2013]. The key idea is that sorting should be done based on proximity to the Pareto front. These papers define the concept of Pareto layers, where layer is the Pareto front, and layer is the Pareto front that would result if all solutions from layers to are removed. When selecting parent populations or when pruning children populations, solutions in lower layers are added first, and when a layer can only be added partially, elements of this layer are chosen to increase diversity. Different variations of this method use different strategies for diversity; we use NSGA-III [Deb and Jain, 2013] in our work.
Hypervolume [Auger et al., 2009] is a metric commonly used to compare two sets of image points during Pareto front discovery. To calculate the hypervolume, we draw the smallest rectangular prism (axis-aligned, as per the norm) between some reference point and each point on the pareto front. We then union the volume of each shape to calculate the hypervolume. Thus, a larger hypervolume implies a better approximation of the Pareto front.
3.2. Bi-level Multi-Objective Optimization
Given a design space that defines possible variations of a carpentry model, our goal is to find a design and a corresponding fabrication plan
that minimizes a vector of conflicting objectives, whereis the space of fabrication plans corresponding to design . This setup yields the following multi-objective optimization problem:
where defines the space of all possible plans for fabrication the design . Generally, our problem can be expressed as a bi-level multi-objective optimization that searches across designs to find those with the best fabrication costs, and requires optimizing the fabrication for each design during this exploration [Lu et al., 2016]:
where refers to Pareto-optimal solutions to the multi-objective optimization problem.
A naïve solution to this bi-level problem would be to search over the design space using a standard multi-objective optimization method, while solving the nested optimization problem to find the fabrication plans given a design at each iteration. Given the combinatorial nature of our domain, this would be prohibitively slow, which motivates our proposed solution.
3.3. Equivalence Graphs (E-graphs)
Typically, programs (often referred to as terms) are viewed as tree-like structures containing smaller sub-terms. For example, the term has the operator at its “root” and two sub-terms, and , each of which has no sub-terms. Terms can be expressed in multiple syntactically different ways. For example, in the language of arithmetic, the term is semantically equivalent to , but they are syntactically different. Naïvely computing and storing all semantically equivalent but syntactically different variants of the a term requires exponential time and memory. For a large program, this makes searching the space of equivalent terms intractable.
E-graphs [Nelson, 1980] are designed to address this challenge—an is a data structure that represents many equivalent terms efficiently by sharing sub-terms whenever possible. An not only stores a large set of terms, but it represents an equivalence relation over those terms, i.e., it partitions the set of terms into equivalence classes, or e-classes, each of which contains semantically equivalent but syntactically distinct terms. In Section 4.2, we show how to express carpentry designs in a way that captures the benefits of the .
Definition 3.2 (E-graph).
An is a set of equivalence classes or e-classes. An e-class is a set of equivalent e-nodes. An e-node is an operator from the given language paired with some e-class children, i.e., is an e-node where is an operator and each is an e-class that is a child of this e-node. An e-node may have no children, in which case we call it a leaf. An represents an equivalence relation over terms. Representation is defined recursively:
An represents a term if any of its e-classes do.
An e-class represents a term if any of its e-nodes do. All terms represented by e-nodes in the same e-class are equivalent.
An e-node represents a term if each e-class represents term . A leaf e-node represents just that term .
Figure 2 shows an example of an and representation. Note how the maximizes sharing even across syntactically distinct, semantically equivalent terms. When adding e-nodes or combining e-classes, the automatically maintains this maximal sharing property, using existing e-nodes whenever possible.
4. Optimization Algorithm
Our algorithm takes as input a carpentry design with a discrete set of possible design variations. Design variations determine different ways to decompose a 3D model into a set of fabricable parts, as shown in Figures 3 and 4. These can be manually or automatically generated (see Section 1.1 of the supplemental material).
Our goal is to find Pareto-optimal solutions that minimize fabrication cost, where each solution is a pair of design variation and fabrication plan. Similar to prior work [Wu et al., 2019], we measure cost in terms of material usage (), cutting precision (), and fabrication time (). Section 1.3 of the supplemental material describes how these metrics are computed for this work.
4.1. Motivation and Insights
Given an algorithm for finding the Pareto-optimal fabrication plans for a given design (e.g., the one proposed by Wu et al. ), a brute force method would simply find the Pareto-optimal solutions for each of the possible design variations and take the dominant ones to form the Pareto front of the combined design/fabrication space. Since design variations can produce an exponentially large space of designs , this approach would be intractable for complex models. An alternative approach could use a discrete optimization algorithm to explore the design space (e.g. hill climbing). This approach would still need to compute the Pareto-optimal fabrication plans for each design explored in every iteration, which can expensive for complex design variants (e.g., it takes 8-10 minutes to compute Pareto-optimal fabrication plans for a single design variation of the chair model in Figure 1 using the approach of Wu et al. ).
We address these challenges with two key insights:
Design variants will share common sub-parts (both within a single variant and across different variants). As shown in Figure 3, even in a design where no two parts are the same, there is significant overlap across design variations. Exploiting this sharing can prevent recomputing the fabrication cost from scratch for every design variation. We propose using a to capture this sharing when (sub-)designs have the same bag of parts; we call this the BOP E-graph.
The space of design variants is too large to exhaustively explore, and even a single variant may have many Pareto-optimal fabrication plans. We propose using the BOP E-graph to guide the exploration in an incremental manner, with a new technique called ICEE (Iterative Contraction and Expansion of the E-graph) that jointly explores the design and fabrication plan spaces.
4.2. Bag of Parts (BOP) E-graph
Our algorithm selects a Pareto-optimal set of fabrication plans, each of which will produce a design variation of the given model. A fabrication plan consists of four increasingly detailed things:
A bag of parts, a bag222 A bag or multiset is an unordered set with multiplicity, i.e. it may contain the same item multiple times. We will use the terms interchangeably. (a.k.a. multiset) of atomic parts that compose the model.
An assignment that maps those parts to individual pieces of stock material.
A packing for each piece of stock in the assignment that dictates how those parts are arranged in that stock.
A cutting order for each packing that specifies the order and the tool (chopsaw, tracksaw, etc.) used to cut the stock into the parts.
We say that an arrangement is items 1-3: a bag of parts assigned to and packed within pieces of stock material, but without cutting order decided. We can create a language to describe arrangements; a term in the arrangement language is one of the following:
An atomic node is a childless operator that represents a bag of parts packed into a single piece of stock. For example, maps two squares and one triangle all to the same piece of stock of type using a packing .
A union node takes two child arrangements and composes them into a single arrangement. The following arrangement is a union node of two atomic nodes: . It packs two squares into stock of type using packing , and it packs a triangle into a different piece of stock of the same type using packing .
To put arrangements into an , we must define the notion of equivalence that the uses to determine which e-nodes go in the same e-class. The more flexible this notion is (i.e., the larger the equivalence relation), the more sharing the can capture.
To maximize sharing, we say two arrangements are equivalent if they use the same bag of parts (BOP), even if those parts are assigned to different stock or packed differently. For example, is equivalent to even though they use different kinds of stock, and is equivalent to even though the former uses one piece of stock and the latter uses two.
Given our arrangement language and the BOP notion of equivalence, we can now describe the central data structure of our algorithm, the BOP E-graph. Recall from Section 3.3 that e-nodes within an have e-class children rather than e-node children. So, viewing our arrangement language at the level, union e-nodes take two e-classes as children. All e-nodes in the same e-class are equivalent, i.e., they represent terms that use the same bag of parts but that arrange those parts differently into stock.
Figure 5 gives two example design variations and a BOP E-graph that captures a common sub-arrangement between the two. The e-classes E1 and E2 represent terms that correspond to the two box designs, and E4 captures ways to arrange the and parts which the variants share. The design variant including part also captures sharing with itself: e-class E5 reuses the arrangement in e-class .
Note that arrangements and the BOP E-graph do not mention designs. We do not “store” designs in the , we just need to remember which e-classes represent bags of parts that correspond to designs that we are interested in. This can be done outside the with a mapping from designs to e-classes. Many designs (especially symmetric ones) may have the same bag of parts. We call an e-class that is associated with a design a root e-class, and we call a term represented by a root e-class a root term. The BOP E-graph itself does not handle root vs. non-root e-classes or terms differently, these are only used by the remainder of the algorithm to remember which arrangements correspond to design variants. The BOP E-graph will maximize sharing across design variations and arrangements since it makes no distinction between the two.
4.3. Iterative Contraction and Extension on E-graphs (ICEE)
ICEE takes a feasible design space as input, and outputs a Pareto front where each solution represents a (design, fabrication) pair. An overview of this algorithm is shown in Figure 6.
The initialization step selects a small subset of design variants from (Section 4.3.2) and then generates a small number of fabrication arrangements for each one (Section 4.3.3). All of these are added to the BOP E-graph, maintaining the property of maximal sharing, as described above. ICEE then applies the extraction algorithm (Section 4.3.4) to generate a Pareto front from the current BOP E-graph. This process will compute many different solutions and their fabrication costs , all of which are stored in the solution set .
The resulting Pareto front is used to compute ranking scores for each e-class in the BOP E-graph; the ranking score measures how often this bag of parts is used in Pareto-optimal solutions and how many fabrication variations have been explored for this bag of parts. Using these scores, ICEE contracts the BOP E-graph by pruning e-classes that have been sufficiently explored but still do not contribute to Pareto-optimal solutions (Section 4.3.5).
Having pruned the of the less relevant e-classes, ICEE then expands the BOP E-graph in two ways (Section 4.3.6). First, it suggests more design variations based on the extracted Pareto-Optimal designs. Second, it generates more fabrication arrangements for both the new generated design variations and some of the previously existing e-classes. The ranking scores are used to select e-classes for expansion.
ICEE then extracts the new Pareto front from the updated BOP E-graph and repeats the contraction and expansion steps until the following termination criteria are met: 1) there is no hypervolume improvement within iterations, or 2) we exceed iterations. Additionally, we set a timeout beyond which we no longer change the BOP E-graph, but continue to extract based on crossover and mutation until one of the termination criteria is met. In our experiments, we set , , and hours.
4.3.2. Initial Generation of Design Variants
We bootstrap our search with the observation that design variations with more identical parts tend to be cheaper to fabricate because less time is spent setting up fabrication processes. Therefore, instead of initializing the BOP E-graph with designs randomly selected from , we randomly select up to designs and select the top designs from this set that have a maximal number of identical parts.
4.3.3. Fabrication Arrangements Generation
Again, instead of randomly generating arrangement variations for a given design, we use heuristics; namely, that (1) we can minimize the number of cuts by stacking and aligning material to cut multiple parts with a single cut, and (2) we can minimize the material cost by packing as many parts as possible to a single stock. Since a similar method for generating arrangement variations has been previously proposed by Wu et al. , we leave a detailed discussion of the algorithm for supplemental material (Section 1.2). We note that the key difference between our method and the prior heuristic-driven algorithm is that we incorporate storage and direct control schemes that enable the method to output variations that are different from the ones generated during previous iterations of ICEE. This is essential to enable incremental expansion of the BOP E-graph without restoring variations that have already been pruned in previous contraction steps.
4.3.4. Pareto Front Extraction
In parlance, extraction is the process of selecting the “best” represented term from an according to some (typically single-objective) cost function. One way to view extraction is that it simply chooses which e-node should be the canonical representative of each e-class; once that is done, each e-class represents a single term. Since our cost function is multi-objective, we must instead extract a set of terms (arrangements) from the BOP E-graph that forms a Pareto front.
We use a genetic algorithm [Deb and Jain, 2013] to extract terms from the BOP E-graph. The population size is set to . The genome is essentially a list of integers, one per e-class, that specifies which e-node is the representative. Since the BOP E-graph may have multiple root e-classes (corresponding to multiple design variations), we combine the genes for all the root e-classes, only picking a single e-node among all of them. In effect, this means the genome defines both a design variation and the arrangement for that design.
For example, consider the bold term within the BOP E-graph in Figure 5. The genome for that term is as follows, where could be any integer since that e-class is not used by the term:
The root e-classes and share a single integer , meaning that the genome chooses the th e-node across both e-classes, and that it uses the first of the two design variants. Since this encoding boils down to a list of integers, which is valid as long as each integer corresponds to an e-node in that e-class, we can use simple mutation and single-point crossover operations.
A term does not completely determine a fabrication plan; it only specifies the arrangement. We need to additionally compute the cutting order for a given term to define a solution and then evaluate the fabrication costs. We observe that the material cost does not depend on the cutting order and that precision and fabrication costs strongly correlate once the arrangement is fixed. This is not surprising since cutting orders that minimize set-ups will jointly reduce time and precision error. Given this observation, we can compute two solutions for each term, using two single-objective optimizations for computing cutting order: one that minimizes precision, and the other fabrication time.
We use two strategies to speed up these optimizations: (1) storing computed cutting orders in atomic e-nodes that will be shared across many terms and (2) a branch and bound technique. The optimization works as follows. Given a term, we first compute the optimal plans for the atomic e-nodes that have not been previously optimized. For each such e-node, we try to generate maximal different orders of cuts, then extract the optimal plans with [Wu et al., 2019] method. We use this result to compute an upper and a lower bound for the term. If the lower bound is not dominated by the Pareto front of all computed solutions , we run an optimization that uses the upper bound as a starting point (see Section 1.4 of the supplemental material for details).
We again terminate the algorithm if there is no hypervolume improvement within iterations, or if we exceed iterations. In our experiments, we set and
and set the probability of crossover () and mutation () are set to be , respectively.
4.3.5. BOP E-graph Contraction
As the algorithm proceeds, BOP E-graph contraction keeps the data structure from growing too large. To contract the BOP E-graph, we search for e-classes that represent bags of parts that have been sufficiently explored by the algorithm but are not present in Pareto-optimal designs. This indicates that we have already discovered the best way to fabricate these bags of parts but they still do not contribute to Pareto optimal solutions; these e-classes are then deleted.
To measure how much an e-class has been explored, we first compute how many variations of fabrication arrangements have been encoded in the BOP E-graph. This number is stored over the and updated after each expansion step to ensure consistency following contraction steps. The exploration score, , is then defined as this value divided by the number of possible fabrication arrangements for an e-class, which we approximate by the number of parts in the e-class multiplied by the number of orientations of each part that can be assigned to the stock lumber.
The impact of an e-class, , is measured based on how often it is used in the set of solutions in the current Pareto front. We use the assignment of solutions to layers determined by the non-dominated sorting (3.1) to compute for a given e-class. We initialize a with value and increment it by every time this e-class is used in a solution from layer , where is the total number of valid layers.
We normalize all computed exploration and impact scores to be between zero and one and then assign the following pruning score to each e-class:
where the weight is chosen to trade-off between exploration and impact. If the is smaller that the pruning rate, , the e-class is removed along with any e-nodes pointing to this e-class (i.e. parent e-nodes). We set and to and in our implementation.
4.3.6. BOP E-graph Expansion
We expand the BOP E-graph by first generating new design variations and then by generating fabrication arrangements for both the existing and newly generated design.
We generate new design variations using a single step of a genetic algorithm that operates over the design space. The probability of crossover () and mutation () are set to be , respectively. We select the parent design variations from based on the non-dominated sorting technique (Section 3.1). Since many solutions in
can correspond to the same design, we assign designs to the lowest layer that includes that design. We then generate new design variations with crossover and mutation operations. We use an integer vector encoding for each design. This time, the vector indexes the joint variations, e.g., for the designs shown inFigure 4, . We get design variations by applying times of the single step genetic algorithm. Then we apply the same heuristic done during initialization (Section 4.3.2), selecting the top . Finally, the resulting designs are included to the BOP E-graph. We set in our implementation.
We generate fabrication arrangements for each of the new design variations using the algorithm described in Section 4.3.3, and they are added to the BOP E-graph maintaining the maximal sharing property. We further generate fabrication arrangements for existing design variations, using a similar scoring function used during contraction. This is done in two steps. First we select root e-classes to expand based only on their impact score; namely, we take the top root e-classes using non-dominated sorting. We then proceed to generate fabrication arrangements using the algorithm described in Section 4.3.3). However, instead generating the same number of fabrication arrangements variations for every selected root e-class, the number is adaptive to their pruning scores (as defined in Section 4.3.5).
5. Results and Discussion
In order to gauge the utility of our tool, we want to answer the following questions:
How much does searching the design space with the fabrication space improve generated fabrication plans?
How does our tool compare with domain experts who are asked to consider different design variations?
How does our tool’s performance compare to a baseline naïve approach?
We evaluate our method using the examples in Figure 7. Statistics for each model are shown in Table 1. These models vary widely in visual complexity and materials used — some are made from 1D sequential cuts on lumber, where others require 2D partitioning of sheets. Note the complexity of the search is not inherent to the visual complexity of the model, rather, it is determined by the number of connecting variations and the number of arrangements, which defines the size of the design space and the space of fabrication plans, respectively. For example, the Adirondack chair is more visually complex than the simple chair in Figure 7, but because it has about 5000 times fewer design variations, it converges much more quickly. Models of Art bookcase, Dining room chair, F-Pot, Z-Table, Bench, and Adirondack chair are taken from [Wu et al., 2019].
5.2. Running environment
The parameters used in our ICEE algorithm are scaled based on the complexity of each model, measured in terms of the number of parts and the size of the design space . We further introduce a single tuning parameter , which allows us to trade-off between exploring more design variations (smaller values of ) versus exploring more fabrication plans for given design variations (larger values). For all our experiments, we set to the default value of 0.75. The ICEE parameters are set as follows: , , , , and , , , , , hours, , , , , , and , where .
We report the running times of our algorithm in Table 2 for the models in Figure 7. The above times are measured on a MAC laptop computer with 16GB RAM and a 2.3 GHz 8-Core Intel Core i9 CPU. More discussion of the running time is in the supplemental material.
5.3. Benefits of Design Exploration
To demonstrate the benefit of simultaneous exploration of the design variation and fabrication plan spaces, we compare our tool against optimizing the fabrication plan for a single design.
Figure 8 shows the comparison between our pipeline and the Carpentry Compiler pipeline [Wu et al., 2019] which only considers a single design. The parameter setting of their pipeline and additional results can be found in Section 2 of the supplemental material. We explore the trade-offs for fabrication time and material usage for the designs where all cuts can be executed with standard setups (these are considered to have no precision error) and include a third objective of precision error for the models where that is not possible. The Pareto fronts across designs generated by our tool cover a larger space and many of our solutions dominate those from previous work.
Exploring design variations enables better coverage of the Pareto front, which enables finding better trade-offs. These trade-offs are lower-cost overall, cover more of the extrema, and are more densely available. For example, a hobbyist may want to minimize material cost independent of time, as the manufacturing process is enjoyable, and they consider it to have no cost. Material cost is hard to save, but our exploration of design variations enable solutions that reduce material cost by 7% in the Loom, 7% in the Jungle Gym, 15% in the Frame, and 25% in the Bookcase. On the other hand, someone with free access to reclaimed wood may only care about the total manufacturing time. Our approach enables solutions that reduce fabrication time by 60% — two models saved between 50-60%, three between 30-35%, and four between 20-30%, for example — a huge time savings. If creating a very precise model is imperative, and a user would take great care to manufacture it exactly, then for four models, we find solutions that reduce error by 61-77%. The detailed data are listed in Table S5 of the supplemental material.
Some examples don’t lie at the extrema: businesses often need to find a balance between the cost of materials, time spent on a project, and overall project quality, and the particular tradeoff will depend on their accounting needs. Our method enables finding solutions with better tradeoffs. Concretely, consider a carpenter charging $40/h. When scalarizing our multi-objective function into this single objective of money, we have several examples where the lowest cost on our Pareto front is 5-8% cheaper than the lowest cost on the baseline Pareto front, such as the Z-Table, Flower pot, Jungle Gym, Dresser, Bookcase, and Art Bookcase. The window and frame have cost savings of of 12% and 20%, respectively. Though a cost reduction of several percent might appear insignificant, in production at scale, it represents thousands of dollars potentially saved. This scalarization function is just one way for a user to judge the tradeoff between different aspects of the multi-objective function. In reality, the user probably has some notion of what tradeoff would be ideal for their purposes, and will use the pareto front to represent the full space of options and make an informed choice. This scalarized tradeoff is further examined in the Table S7 of the supplemental material.
5.4. Comparison with Experts
For each model, we asked carpentry experts to generate design variations and fabrication plans. The resulting points are plotted as diamonds in Figure 8. Since experts produce each solution by hand, they produced Pareto fronts with many fewer solutions than our tool. For 14 of 16 models (except the Loom and Dresser models), solutions generated by our tool dominate the expert solutions. This suggests that, generally, although expert plans seem sensible, our tool generates better output thanks to its ability to generate more design variations and fabrication plans, including potentially unintuitive packing or cutting orders, and evaluate them much more quickly than a human.
5.5. Performance Evaluation
To test whether the BOP E-graph’s sharing is important for our tool’s performance, we compare against a nested-optimization pipeline built on the Carpentry Compiler [Wu et al., 2019]. The baseline approach invokes the Carpentry Compiler pipeline on each design variant that our tool explores, and then it takes the Pareto front across all design variations.
We choose five models of varying complexity to evaluate performance and show results in Table 3. We tuned the parameters of the baseline method so we could achieve results that were as close as possible, if not qualitatively the same (when the baseline method ran to completion). Full results are available in the supplemental material (Table S6 and Figure S1). This indicates that our co-optimization approach yields similar results to the nested approach over the same space. When it comes to performance, our approach is about one order of magnitude faster. We attribute this speedup to the sharing captured by the BOP E-graph; we only had to evaluate common sub-designs and sub-fabrication-plans one time, whereas the baseline shared no work across its different invocations for each design variant.
5.6. Fabricated Results
We validated our pipeline by physically constructing some of the models according to the design variation-fabrication plan pairs generated by our tool. Figure 11 shows the results.
6.1. Multi-Materials and Cutting Tools
Mechanical or aesthetic reasons might motivate designers to combine multiple materials, such as different types of wood, or wood and metal, in one model. Adding new materials to our approach involves almost no implementation overhead: we must select which cutting tools are appropriate, and accommodate the material’s costs into our metrics. Then, we simply need to indicate which material a given part is made of, exactly the same way we designate whether parts belong on 1D lumber or 2D stock. As shown in Figure 12, we have created a mixed-material model to showcase our ability to handle this added design complexity. The loom is made of two different types of wood as well as one kind of metal. All parts are optimized in the same and treated identically to the base implementation. We describe the cost metrics for different materials in the supplemental material (Section 1.3.1).
Our method also naturally extends to other objective functions. We show one example in Figure 13, where we consider stability as an additional objective which we calculate with physical simulation. Notably, stability is invariant to the fabrication plan, and depends solely on the design itself, so it only needs to be measured once, at the root node. However, two designs can have different stability costs but share the same bag of parts. Figure 13 (a) and (b), exhibits one bag of parts which captures two different designs.
In this example, since the other metrics (time and material cost) do not exhibit this dependency, we can simply assign to the root nodes the stability cost of the best-performing design that corresponds to that bag of parts; thus the cost for any given bag of parts is the best cost of any design that is represented by that bag of parts. Note that fabrication plans depend solely on the bag of parts. In general, if we want to use more than one metric like this one — a metric that depends on the design, and is not completely determined by a term in the e-graph — we would need to compute the different trade-offs for the variations during extraction, as was done with cutting order and precision, described in Section 4.3.4.
While our results show the significance of the approach to reduce fabrication cost in practice, we cannot make any guarantees that plans we output are on the globally-optimal Pareto front. Indeed, we do not anticipate that any alternative approach would be able to have such strong guarantees given the inherent complexity of the problem. This convergence limitation impacts our method in three different ways.
Due to limitations in exploring the full combinatorial space, parameters of our search algorithm may influence convergence. Because the key aspect of ICEE is simultaneously searching “broad” (design variations) and “deep” (fabrication plans for various designs), we expose the parameter that trades-off between depth and breadth during search. Exposing this single parameter, enables us to improve performance in special circumstances. For example, when not much can be gained from design variations, a larger will enable searching deeply on a particular design finding better solutions. All the results shown in this paper use the default value for that we have found effective in practice.
Comparison with Wu et al. 
The fundamental difference between our work and [Wu et al., 2019] is that incorporating more design variations increases the design space, enabling us to find better performing results. Since the search space of this prior work is a subset of the search space we explore, our results should be strictly better. However, since neither method can ensure the results lie on the true Pareto front due to limitations in convergence, tuning parameters of both approaches may influence this result. An example of this limitation in shown in A-Chair example in Fig7. We show in the supplemental material (Section 2.4) how tuning to explore more deeply improves this result and also report experiments for tuning the 4 parameters from [Wu et al., 2019].
Increasing the Design Space
A final implication of the intractable search is that it is possible to achieve worse results by increasing the design space in special circumstances. We discuss in the supplemental material (Section 2.4) an example where we make the design space 145 times larger by including variations that do not benefit the search.
6.4. Limitations and Future Work
Our current approach encodes only discrete design variants in the BOP E-graph. An interesting direction for future work would be to support continuous variations in the designs space which can provide a larger space of fabrication plans to explore. However, supporting continuous design variants in an would require designing a new metric for comparing two design variants for equivalence. This is challenging because e-graphs heavily exploit transitivity, so any error in the metric could lead to arbitrarily different designs being considered “equivalent”.
Several steps of our algorithm can also be parallelized for performance (e.g. generating design variants)—we leave this as an extension for the future.
We are also keen to explore broader applications of the ICEE strategy for integrating feedback-directed search in other -based optimization techniques. Past work applying for design optimization in CAD [Nandi et al., 2020] and for improving accuracy in floating-point code [Panchekha et al., 2015] have relied on ad hoc techniques for controlling the growth of the , e.g., by carefully tuning rules used during rewrite-based optimization. We hope to explore whether ICEE can help with optimization in such domains by focusing the search on more-profitable candidates and easing implementation effort by reducing the need for experts to carefully tune rewrite rules.
The most time-consuming part of our ICEE algorithm lies in the Pareto front extraction phase. A pruning strategy with learning-based methods for predicting the objective metrics of an arrangement might be an interesting and valuable area of research.
Another direction we are eager to explore is accounting for other factors in the Pareto front. Currently, our technique finds a design variant and fabrication plan that optimizes fabrication time, material cost, and precision. Other interesting factors that can guide the search include ease of assembly and strength of the part.
We have presented a new approach to co-optimizing model design variations and their fabrication plans. Our approach relies on the insight that fabrication plans across design variants will share similar structure. We capture this sharing with the BOP E-graph data structure that considers fabrication plans equivalent if they produce the same bag of parts. The BOP E-graph also lets us guide the search toward profitable design variants/fabrication plans with a technique we call ICEE (Iterative Contraction and Expansion of ) that may be useful for uses of in other applications. Results generated by our tool compare favorably against both expert-generated designs and a baseline built using prior work, indicating that the sharing captured by the BOP E-graph is essential to efficiently exploring the large, combined space of design variants and fabrication plans.
- Volume-aware design of composite molds. ACM Transactions on Graphics. Cited by: §2.
- Theory of the hypervolume indicator: optimal -distributions and the choice of the reference point. In Proceedings of the tenth ACM SIGEVO workshop on Foundations of genetic algorithms, pp. 87–102. Cited by: §3.1.
- State of the art on stylized fabrication. Computer Graphics Forum 37 (6), pp. 325–342. External Links: Cited by: §2.
- Field-aligned mesh joinery. ACM Transactions on Graphics (TOG) 33 (1), pp. 1–12. Cited by: §2.
- A fast and elitist multiobjective genetic algorithm: nsga-ii. Trans. Evol. Comp 6 (2), pp. 182–197. External Links: Cited by: §3.1.
An evolutionary many-objective optimization algorithm using reference-point-based nondominated sorting approach, part i: solving problems with box constraints.
IEEE transactions on evolutionary computation18 (4), pp. 577–601. Cited by: §3.1, §4.3.4.
Solving bilevel multi-objective optimization problems using evolutionary algorithms. In International conference on evolutionary multi-criterion optimization, pp. 110–124. Cited by: §2.
- Multi-objective optimization. In Search methodologies, pp. 403–449. Cited by: §3.1.
- Bilevel optimization: theory, algorithms and applications. TU Bergakademie Freiberg, Fakultät für Mathematik und Informatik. Cited by: §2, §2.
- RoboCut: hot-wire cutting with robot-controlled flexible rods. ACM Transactions on Graphics (TOG) 39 (4), pp. 98–1. Cited by: §2.
- Multiobjective bilevel optimization. Mathematical Programming 123 (2), pp. 419–449. Cited by: §2.
- CurviSlicer: slightly curved slicing for 3-axis printers. ACM Transactions on Graphics (TOG) 38 (4), pp. 1–11. Cited by: §2.
- Computational interlocking furniture assembly. ACM Trans. Graph. 34 (4), pp. 91:1–91:11. External Links: Cited by: §2.
- Computational design of reconfigurables.. ACM Trans. Graph. 35 (4), pp. 90–1. Cited by: §2.
- Computational design of cold bent glass façades. ACM Transactions on Graphics (TOG) 39 (6), pp. 1–16. Cited by: §2.
- Bilevel optimization of multi-component chemical systems using particle swarm optimization. In 2006 IEEE International Conference on Evolutionary Computation, pp. 1240–1247. Cited by: §2.
- Orthogonal slicing for additive manufacturing. Computers & Graphics 37 (6), pp. 669–675. Cited by: §2.
- Denali: a goal-directed superoptimizer. SIGPLAN Not. 37 (5), pp. 304–314. External Links: Cited by: §2.
- Towards zero-waste furniture design. IEEE Transactions on Visualization and Computer Graphics 23 (12), pp. 2627–2640. External Links: Cited by: §2.
- Creating works-like prototypes of mechanical objects. ACM Transactions on Graphics 33 (6). Cited by: §2.
- Converting 3d furniture models to fabricatable parts and connectors. In ACM SIGGRAPH 2011 Papers, SIGGRAPH ’11, New York, NY, USA, pp. 85:1–85:6. External Links: Cited by: §2.
- JigFab: computational fabrication of constraints to facilitate woodworking with power tools. In Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems, CHI ’19, New York, NY, USA, pp. 156:1–156:12. External Links: Cited by: §2.
- Multilevel decision-making: a survey. Information Sciences 346, pp. 463–487. Cited by: §2, §3.2.
- VDAC: volume decompose-and-carve for subtractive manufacturing. ACM Transactions on Graphics (TOG) 39 (6), pp. 1–15. Cited by: §2.
- LayerCode: optical barcodes for 3d printed shapes. ACM Transactions on Graphics (TOG) 38 (4), pp. 1–14. Cited by: §2.
- Synthesizing structured CAD models with equality saturation and inverse transformations. In Proceedings of the 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2020, London, UK, June 15-20, 2020, A. F. Donaldson and E. Torlak (Eds.), pp. 31–44. External Links: Cited by: §2, §2, §6.4.
- Techniques for program verification. Ph.D. Thesis, Stanford University, Stanford, CA, USA. Note: AAI8011683 Cited by: §1, §2, §3.3.
- Automatically improving accuracy for floating point expressions. SIGPLAN Not. 50 (6), pp. 1–11. External Links: Cited by: §2, §6.4.
- Semantic code search via equational reasoning. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2020, New York, NY, USA, pp. 1066–1082. External Links: Cited by: §2.
- Fabrication-aware design with intersecting planar pieces. In Computer Graphics Forum, Vol. 32, pp. 317–326. Cited by: §2.
- Model and interactive algorithm of bi-level multi-objective decision-making with multiple interconnected decision makers. Journal of Multi-Criteria Decision Analysis 10 (1), pp. 27–34. Cited by: §2.
- A review on bilevel optimization: from classical to evolutionary approaches and applications. IEEE Transactions on Evolutionary Computation 22 (2), pp. 276–295. Cited by: §2.
- Reconfigurable interlocking furniture. ACM Trans. Graph. 36 (6), pp. 174:1–174:14. External Links: Cited by: §2.
- Equality-based translation validator for llvm. In Proceedings of the 23rd International Conference on Computer Aided Verification, CAV’11, Berlin, Heidelberg, pp. 737–742. External Links: Cited by: §2.
- A harmonic balance approach for designing compliant mechanical systems with nonlinear periodic motions. ACM Transactions on Graphics (TOG) 39 (6), pp. 1–14. Cited by: §2.
- Equality saturation: a new approach to optimization. In Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’09, New York, NY, USA, pp. 264–276. External Links: Cited by: §2.
- Guided exploration of physically valid shapes for furniture design. ACM Trans. Graph. 31 (4), pp. 86:1–86:11. External Links: Cited by: §2.
- SPORES: sum-product optimization via relational equality saturation for large scale linear algebra. Proc. VLDB Endow. 13 (12), pp. 1919–1932. External Links: Cited by: §2.
- Design and structural optimization of topological interlocking assemblies. ACM Transactions on Graphics (TOG) 38 (6), pp. 1–13. Cited by: §2.
- Egg: fast and extensible equality saturation. Proc. ACM Program. Lang. 5 (POPL). External Links: Cited by: §2.
- Carpentry compiler. ACM Transactions on Graphics (TOG) 38 (6), pp. 1–14. Cited by: §1, §2, §2, §2, §4.1, §4.3.3, §4.3.4, §4, §5.1, §5.3, §5.5, Table 3, §6.3, §6.3.
- DHFSlicer: double height-field slicing for milling fixed-height materials. ACM Transactions on Graphics (TOG) 39 (6), pp. 1–17. Cited by: §2.
- Reforming shapes for material-aware fabrication. In Computer Graphics Forum, Vol. 34, pp. 53–64. Cited by: §2.
- Genetic-algorithms-based approach for bilevel programming models. Journal of transportation engineering 126 (2), pp. 115–120. Cited by: §2.
- Computational design of fabric formwork. Cited by: §2.
- Connected fermat spirals for layered fabrication. ACM Transactions on Graphics (TOG) 35 (4), pp. 1–10. Cited by: §2.