Je remercie chaleureusement toutes les personnes qui m'ont aidé pendant l'élaboration de ma thèse et notamment mon directeur Sylvain Lefebvre, pour son intérêt et son soutien, ainsi que le temps qu'il a passé a relire ce document, ce qui n'était pas une tâche simple.

Ce travail n'aurait jamais été aussi abouti sans l'interêt et les questions incéssante de Dmitry Sokolov et Nicolas Ray qui m'ont appris à toujours me remettre en question. Je remercie également Bruno Lévy et tout les autres membres de l'équipe qui m'ont accueilli au LORIA.

Ce travail n'aurait pas été possible sans le soutien de l'Université De Lorraine, du LORIA et d'INRIA, qui m'ont permis de me consacrer sereinement à l'élaboration de ma thèse.

Je remercie également tout les membres du jury pour leurs commentaires, qui m'ont permis de corriger le document. i 1. http://fabfoundation.

To my family that supported me the time of this thesis. I would not have been able to finish this thesis without them. A ma famille, qui m'a supporté le temps de cette thèse. Je n'aurais jamais été capable de finir sans eux.

Table des matières

Introduction Introduction

The development of Makerspaces and Fablabs is a good indicator that rapid manufacturing blossomed in the past few years. Most of these spaces are equipped with Fused Filament Fabrication (FFF) 3D printers and laser cutters 1 , which are inexpensive and easy to operate technologies for fabrication. The popularization of those spaces led to the development of inexpensive and more user friendly 3D printers. It is now very simple to manufacture physical objects from virtual models, without any specific expertise. Despite their simplicity these machines produce functional physical objects in a variety of materials (plastics, nylon, wood, etc.). Those technologies are important to study because they are popular and accessible, and thus any improvement can bring benefits to a large user base.

Industrial 3D printers were initially targeted at specialists operating the machine, close to the final fabrication process. The increased accessibility of rapid prototyping now allows the initial designer to also be the one operating the machine, and let us envision that the designer might become anyone, from home users to enthusiasts and small entrepreneurs. Interestingly, the main barrier to entry for novel users is no longer the equipment or how to operate it, but rather how to create interesting and useful 3D models to print. Hence we need software that helps end users directly produce parts that can be fabricated, where the software takes into account the constraints of the process, the desired function of the object, and the structural constraints on the final product.

Making an object is not a simple task. It is a complex process that begin with the design of a shape, its function, its aesthetics, while taking into consideration all the various constraints. The process ends by the fabrication itself. Throughout this thesis, we will see novel techniques aimed at simplifying and improving the process of making objects using rapid fabrication technologies. Algorithms can improve the quality of a fabricated model without interfering with the design of the shape. Algorithms may also synthesize novel shapes from incomplete specifications or cooperate with the designer to model fabricable shapes.

The techniques I propose in this thesis explore a trade off along a line between the user and the machine (see Figure 1). The closer the cursor is to the user, the more the algorithm helps her to create the shape. The closer the cursor is from the printer, the less the algorithm changes the design and instead tries to adapt the process.

The increasing popularity of 3D printers led to a change of the community of people that are using the technology. It ranges from designers that are expert users of design tools to hobbyists who do not master these tools. The best software is not the same for different groups of the community. While a design made by an expert might be a work of art that should not be deformed, and fabricated as it is, a hobbyist might expect the software to help him realize his vision. Those different expectations give importance to the exploration of the different positions of the cursor.

The next chapter presents the state of the art of a wide range of methods from the optimization of the 3D printing process to the synthesis of shapes. After the state of the art, I detail my contributions.

The first approaches I introduce focus on the optimization of the 3D printing process. Chapter 2 presents a method to improve the quality of a model printed with multiple materials. I also discuss my contribution to the design of support structures, that are sacrificial scaffoldings added to the geometry of a design to ensure it prints correctly. Chapter 3 introduces techniques that handle fabrication constraints as part of the modelling process. A first approach enables partial 2D specifications of mechanisms to be automatically transformed into fabricable 3D mechanisms. A second approach helps reduce wastage on parametric models made by assembling laser cut planar parts. Moving the cursor even closer to the user, Chapter 4 introduces a technique helping users to model entire designs (in this case furniture) from functional specifications (supporting objects located in space).

Figure 1 -The line between the user and the machine. The closer the cursor it is to the machine (left), the more precise the specification by the user has to be.

State of The Art

Overview

Digital manufacturing is everywhere in modern factories, where computer controlled machines turn virtual designs into actual objects. Objects are mass produced through complex chains of operations involving different machines and processes. However, while largely adopted for mass production, producing prototypes remained a manual activity for a much longer time, involving highly skilled and trained specialists handcrafting physical models. This motivated the research on rapid prototyping techniques. They allow fabricating unique prototypes at low cost, and have been designed to turn a virtual object into a physical prototype as automatically (and quickly) as possible.

Rapid prototyping relies mostly (but not exclusively) on additive manufacturing techniques which are processes of making an object by stacking successive layers of material. There are different technologies based on different principles. Here are the main ones :

-Selective Laser Sintering (SLS) is the principle of using a laser to fuse powder material. Powder is added to the bed layer after layer (typically with 0.1 mm thickness). The laser then locally solidifies contours and the inside. The next layer is added on top, progressively forming the object (see Figure 1.1). -Binder Jetting uses a binder to bond powder material similar to plaster. The binder is deposited by a print head similar to a standard inkjet 2D printer, directly onto the powder bed. -Stereolithography Aparatus (SLA) uses light to solidify a liquid photo-sensible resin with a projector or a laser and mirrors (Figure 1.1). -Fused Filament Fabrication (FFF) uses melted plastic to build the object (Figure 1.4). As I will be focusing on this process later on, it is explained in more detail in Section 1.2. While initially limited to prototyping, the wider range of available materials and the improvements in processes make it now possible to use additive manufacturing to produce functional parts. Among those technologies, fused filament fabrication blossomed the last decade. It is used in fablabs and makerspaces to repair or fabricate customized objects, where mass production is not an option because it is too expensive.

Other fabrication techniques such as laser cutting or computer numerical control mil- ling reached maturity and became simpler to operate. Free software and firmwares are available (Grbl, LinuxCNC are open source solutions for example) for those technologies, which are also present in fablabs and makerspaces. Makerspaces, fablabs and start-ups massively adopted those technologies. This led to a profound change of the typical user profile. At first, the processes were used by expert technicians with extensive training. Nowadays, these machines are used by hobbyists, teachers, small entrepreneurs who want to produce unique and customizable products [START_REF] Mota | The rise of personal fabrication[END_REF]. This evolution creates a need for new software tools that are usable by a wider range of users. My work is part of this trend, focusing on algorithms that can help exploiting available technologies of rapid manufacturing without significant training in CAD software and processes.

Figure 1.2 shows a set of 3D printed models from the website thingiverse, which is a website where people share models to fabricate. As can be seen a wide range of objects are being shared, from chess set pieces, to a functional 3D mechanical clock, and a small music box. All these objects have been created to be 3D printed on inexpensive filament 3D printers. Such sharing platforms are a good example of the profound evolution triggered by the massive availability of 3D printers. Figure 1.3 shows a set of laser cut models. There is an arcade, a dragonfly sculpture and a bottle holder that have been laser cut and assembled. Note how all these models are neatly assembled from planar cut-outs.

In Section 1.2 and Section 1.3 I discuss challenges in fabricating shapes with both FFF and planar cutting. There is a strong link between the geometry of a design and how challenging it is to fabricate on a specific technology. For instance, a given model might contain features that cannot be printed because they are too thin, in which case the fabrication software has to decide (perhaps arbitrarily) either to remove or thicken these features. In some cases, the software will simply reject the design as not fabricable. However, small changes to the design -either by the user or by an algorithm -can greatly simplify the fabrication process. This avoids arbitrary decisions by the machine software, and in some cases is the only way to produce the model.

Research has been conducted on both fronts : Some techniques have been developed to print despite problems in the model, while others have been developed to help users design shapes that can be fabricated more reliably. I present next both methodologies for each of the challenges on filament 3D printing and planar cutting. In Section 1.4 and 1.5 I describe techniques that go even further and automatically model objects from partial user inputs. For example, I describe topology optimization, which is a mathematical technique that optimizes a shape from a set of loads placed in space. These techniques are not necessarily dedicated to specific manufacturing tools. They are focusing on helping users model or synthesize objects that have a specific purpose. Fused Filament Fabrication (FFF) is the process of making an object with melted plastic. Plastic is pushed by a step-by-step motor in a hot tool-head that is moving on a build plate and depositing plastic to build the object layer after layer (See Figure 1.4). This is an additive manufacturing technology : the material is added layer after layer to build an object. The layer thickness is typically between 0.1 and 0.3 millimetre. Usually, printers are equipped with a single print-head but some models have two or more. Having multiple print-heads allows printing multi-material models, and is often used to print multi-color models or to print temporary structures in a dissoluble material.

Modelling and printing with Fused Filament Fabrication

A software tool is needed to compute the paths along which the extruder deposits plastic. This software is called a slicer since its main operation is to slice the 3D representation of an object into thin layers (See Figure 1.5). To compute those layers, the slicer computes the intersection between a plane swept along the Z-axis and the boundary of the model [START_REF] Lefebvre | Icesl : A gpu accelerated modeler and slicer[END_REF]. The intersection between the plane and the surface is a set of closed 2D polygons (assuming the input shape defines a solid). From those polygons the slicer computes the deposition paths. There are four main types of paths :

-The perimeters that represent the visible contour of the model. They are obtained by offsetting the polygons by half the diameter of the extruder. -The shells that are computed by offseting the perimeters inwards. The more shells there are, the sturdier the external surface hull is. -The infills that are inside the shell and fill the printed model. Infills can be dense or sparse, to avoid spending time and material printing inner parts of the model. -The travel paths that are the motions done by the extruder between two printing paths. An important difference to other paths is that travel paths are free variables : they do not define the actual geometry of the printed object. However, as I detail in Chapter 2 these paths may have a detrimental impact on surface quality if not carefully computed, in particular when printing with multiple materials. There is a wide body of research regarding how to slice and to generate tool paths for additive manufacturing. For a review of the main aspects the reader can refer to the survey by Pandey [START_REF] Pandey | Slicing procedures in layered manufacturing : a review[END_REF] et al and the SIGGRAPH course by Dinh and colleagues [START_REF] Dinh | Modeling and toolpath generation for consumer-level 3d printing[END_REF].

Challenges of Fused Filament Fabrication

Existing works tackle several challenges, for instance improving the quality of surface of 3D printed objects, ensuring that a model can be printed, decreasing the print time, improving the mechanical robustness of the models and minimizing the material wastage.

Those challenges are described in detail below as well as the techniques that have been used to solve them. Many of these challenges interact. For example, decreasing the print time might lead to a decrease in the quality of the printed parts ; or reducing the amount of material used to fabricate a model might decrease its mechanical robustness.

As I explained in the overview, some techniques have been developed to print the model as-is. They impact only the way the object is fabricated and focus on the process stage : the steps between the input design and the actual physical device. Other techniques impact the design stage by providing user interfaces that help the user to model fabricable objects or by optimizing the design to make it print more reliably. For each challenge, I introduce both methodologies whenever applicable.

Surface Imperfection

Even if the model is printable on a filament printer, the process might not go well and several defects might appear on the surface of the printed parts (See Figure 1.6). They mostly come from the fact that the melted plastic is oozing from the extruder by gravity (See Figure 1.6 Right). The plastic that oozed ends up being deposited on the surface of the printed object. Oozing leads to another defect : holes (See Figure 1.6 Centre). The plastic that oozed is now missing, and the software that planned the motions is unaware of this. The extruder needs to be refilled to avoid holes in the printed part. Slicers reduce oozing by relying on retraction : the plastic filament is pulled backwards by the motor just before travel moves, thus depressurizing the melted plastic chamber inside the nozzle. While plastic will not ooze immediately, oozing still restarts after a few seconds. Due to this, oozing and holes are more likely to appear in multi-material prints since extruders might be idle for long periods while others print.

Another defect are so-called zippers. The position of the endpoint of the perimeters are visible on the final model (Figure 1.6 Left), producing defects that look like zippers along the entire height of the printed part. This defect always appears but may be less visible with a well-calibrated 3D printer.

Chapter 2 presents a technique that limits those three defects. Slicing the object into layers produces an approximation of the original surface. This produces a stair case defect, visible on the surface of most 3D printed objects. This defect reveals the approximation error with respect to the initial surface (see Figure 1.7). The quality of the approximation depends on the thickness of the layers used during the slicing process. For a same input object, the impact of layering can also be reduced by changing the object orientation, whenever possible (in particular this interacts with the need for supports, see Section 1.2.1.3). Thus, several approaches have been proposed to optimize for the object orientation such as to increase surface quality [START_REF] Pandey | Slicing procedures in layered manufacturing : a review[END_REF]. Build orientation has been studied a lot, the interested reader can refer to the survey by Taufik et al. [START_REF] Taufik | Role of build orientation in layered manufacturing : a review[END_REF].

A drawback of using thinner layers is that the print time may significantly increase. To avoid this, adaptive slicing methods have been proposed [START_REF] Taufik | Volumetric error control in layered manufacturing[END_REF][START_REF] Suh | Adaptive slicing of solid freeform fabrication processes[END_REF][START_REF] Dolenc | Slicing procedures for layered manufacturing techniques[END_REF]. These techniques change the height of the layers depending on the model geometry. However they are not able to adapt to changes in complexity within the layer. To tackle this problem locally adaptive slicing has been introduced [START_REF] Tyberg | Local adaptive slicing[END_REF]. The key idea is to divide the model into region that are sliced independently [START_REF] Wang | Saliencypreserving slicing optimization for effective 3D printing[END_REF]. The mains issue is that zippers appear along the surface, where the slices with different thicknesses meet. This smear can be avoided by slicing the interior with a larger thickness than the exterior [START_REF] Sabourin | Accurate exterior, fast interior layered manufacturing[END_REF].

Another way to further improve quality is to decompose the input into different parts, and change the build orientation of each part after decomposition [START_REF] Hildebrand | Orthogonal slicing for additive manufacturing[END_REF].

Multi Material

Filament printers are sometimes equipped with multiple extruders. Those additional tools allow users to print with multiple materials, and are often used to have different colors within the same object.

In Chapter 2, I propose a method that improves print quality when printing with multiple extruders. Here is how the main available slicers deal with this problem. The input to the slicing process is a set of meshes. Each one describes the volume that has to be filled with a material by the corresponding extruder. Each mesh is sliced independently and the tool paths are merged, typically printing materials in sequence. KisSlicer2 deals with oozing by creating a wipe tower on the side of the print and by wiping the extruder on this tower before switching tools. MakerBot Desktop3 deals with oozing by adding a wall on each side of the print to wipe the extruder before printing. RepRapPro4 lowers the temperature of the idling extruder to avoid oozing. However, this increases print time significantly because the printer is not printing while the temperature is decreasing. Inspired by dithering techniques, Reiner et al [START_REF] Reiner | Dualcolor mixing for fused deposition modeling printers[END_REF] presented a method to produce objects that look like the colors in the extruders were mixed. For instance, using black and white filaments it can print objects with shades of gray.

MakerBot and KisSLicer avoid holes by printing the wall or the tower with the next printing extruder. This refills the extruder before printing the actual object. With this technique, holes may appear in the wall or the cleaning tower -one danger is that they might not be robust enough to clean the extruder and avoid oozing. Thus, the size of the walls and towers has to be large enough to ensure it remains robust.

Overhangs

Newly extruded filament has to be deposited over an existing surface (the build plate or previously deposited filament) or it will fall under gravity and the print fails (Figure 1.8). That is why it is necessary to compute a support structure that will be printed at the same time as the model. This structure is removed and disposed of after fabrication. Some materials are dissoluble in special liquids (HIPS is dissoluble in D-Limonene, PVA is dissoluble in water) and available as filaments that can be used in 3D printers. They can be used to print the support structure with a second extruder mounted on the printer (in which case all the challenges mentioned in the previous paragraph apply). Figure 1.9 -an example of overhang. Left The angle (in green) between the Z axis and the face is smaller than the threshold, the dark blue face does not require support. Right The angle (in red) is bigger than the threshold, the face require support Support structures are a major inefficiency of additive manufacturing processes, as they waste time, material and require manual finishing steps. Therefore, reducing the need for supports and minimizing their impact has been, and remains, a very active topic of research. This is a case where researchers have proposed techniques both at the process stage (design remains unchanged) and at the design stage (guiding users towards designs that require less supports).

Process Stage. First, one needs to compute the regions that require support, and then one has to compute the shape of the structure itself.

The regions that require support are analyzed in several ways. It can be done by comparing the angle between the vertical and the faces of the model [START_REF] Alexander | Part orientation and build cost determination in layered manufacturing[END_REF][START_REF] Allen | Determination and evaluation of support structures in layered manufacturing[END_REF]. If the angle is bigger than a threshold, then the face requires support (see Figure 1.9). Detection can be done by a Boolean difference between two successive slices [START_REF] Allison | Boolean layer comparison slice[END_REF][START_REF] Chalasani | Support generation for fused deposition modeling[END_REF], using the width of the difference to determine if a region is self-supported. In our work we proposed to compute it from the print paths and the slices. For each point of each print path, the algorithm considers whether the slice below covers the point to be supported (checking which percentage area of a disk centered on the point and having the extruder width is covered). Note that other techniques have been proposed, for instance based on image processing [START_REF] Huang | Algorithms for Layered Manufacturing in Image Space[END_REF].

Several techniques have been proposed to generate supports. Some form a dense support volume below the surfaces in overhang. The support volume is then usually printed with a weak infill pattern (KISSlicer, Makerware, [START_REF] Strano | A new approach to the design and optimisation of support structures in additive manufacturing[END_REF]). The support is manually removed by breaking it apart from the object. Soluble material can also be used on multiple material printers [START_REF] Kritchman | System and method for printing and supporting three dimensional objects[END_REF]. Printing the support volume uses a significant amount of material and print time, but is very reliable : the support typically has a large area of contact with both the part and the print bed, ensuring the print stability in most cases. The volume is large enough to print without difficulty. A number of approaches modify the support volume to reduce its size. Huang et al. [START_REF] Huang | Sloping wall structure support generation for fused deposition modeling[END_REF] use sloped walls instead of straight walls for the sides, shrinking the support volumes in their middle sections. Heide [START_REF] Heide | Method for generating and building support structures with depositionbased digital manufacturing systems[END_REF] also reduces the support volume by decreasing its size and complexity as the distance below the supported model increases. The size of the support structure depends on the size of the area that requires supports. This area can be reduced by changing the orientation of the model on the build-plate [START_REF] Alexander | Part orientation and build cost determination in layered manufacturing[END_REF]. Zhang et al [START_REF] Zhang | Perceptual models of preference in 3d printing direction[END_REF] optimize the orientation to avoid support in zones of the model that have an impact on the perception of the model by an human.

Another family of approaches, increasingly popular, produces a sparse set of points that need to be supported, usually by down-sampling [START_REF] Eggers | Method and apparatus for automatic support generation for an object made by means of a rapid prototype production method[END_REF] the initial set of points. Vanek et al. produce a geometry based approach to support this set of point [START_REF] Vanek | Clever Support : Efficient Support Structure Generation for Digital Fabrication[END_REF]. Schmidt and Umetani [START_REF] Schmidt | Branching support structures for 3d printing[END_REF] introduce branching support structure.

Design Stage

The support structure has a significant impact on the quality-of-surface of the model. When the support is removed, it leaves white dots on the printed parts. There exist method that deform a shape to minimize the amount of support [START_REF] Hu | Support slimming for single material based additive manufacturing[END_REF]. Reiner et al. [START_REF] Reiner | Interactive Modeling of Support-free Shapes for Fabrication[END_REF] presented a design tool that allows the user to model a 3D object that does not require support structure.

Print Time

The first point of 3D printing was to build prototypes quickly to let the designer iterate and modify an initial design idea. However the print time is often in hours, and reducing it would further fasten design iterations. Decreasing the print time by augmenting the speed of the extruder leads to defects that appear on the surface of the models. In addition, current printer firmwares take the maximal acceleration of the extruder into account during the fabrication stage, and this often constitutes the limiting factor. Therefore, the print time depends mostly on the path generation and the position of the different parts on the print bed if there is more than one. Process Stage Several approaches optimize the tool-paths to minimize the print time [START_REF] Castelino | Tool-path optimization for minimizing airtime during machining[END_REF]. This leads to a Travelling Salesman problem (TSP) formulation [START_REF] Wah | Tool path optimization in layered manufacturing[END_REF] where each node of the graph is a printing path and the edge are the distance between each path. In general, print paths are closed paths and the formulation of the tool-path optimization with a TSP is limited to methods that are selecting the in/out position of the extruder for each path before the optimization. However, a TSP can be generalized (GTSP) [START_REF] Xiaomao | Tool path planning based on endpoint build-in optimization in rapid prototyping[END_REF] : the node of the graph are grouped into clusters that are mutually disjoints. The sought solution is the path that visits exactly one node of each clusters. This problem is still NP-Hard and therefore it is recommended to use a heuristic to optimize it. We can note that perimeters and shells are cycle and they are including infills or other shells (see Figure 1.10). This information helps to tailor a good heuristic that optimizes the tool-path [START_REF] Choi | A topological hierarchy-based approach to toolpath planning for multi-material layered manufacturing[END_REF].

If the path planning of concurrent tool has been investigated [START_REF] Choi | A dynamic priority-based approach to concurrent toolpath planning for multi-material layered manufacturing[END_REF] it is less relevant in the case of filament printers where the different extruders are most often fixed to the same carriage (variants exists though).

The layering direction can be optimized to minimize the height of the part on the build plate. The motion speed of the printer is not the same for each axis [START_REF] Thrimurthulu | Optimum part deposition orientation in fused deposition modeling[END_REF]. Z axis moves slower, reducing the height reduces the build time.

Modelling and printing with Fused Filament Fabrication

The print time can be significantly reduced by hollowing and splitting the object hull in parts (I mention those techniques in section 1.2.1.5) or by printing the shape around an empty core [START_REF] Song | Cofifab : Coarseto-fine fabrication of large 3d objects[END_REF][START_REF] Gao | Revomaker : Enabling multi-directional and functionally-embedded 3d printing using a rotational cuboidal platform[END_REF].

Design stage Mueller et al. [START_REF] Mueller | Wireprint : 3d printed previews for fast prototyping[END_REF] presented a method to compute and fabricate wire like low-res models that can be 3D printed faster than the designed model. This method has been extended to 5 degrees of freedom (DOF) printers [START_REF] Wu | Printing arbitrary meshes with a 5dof wireframe printer[END_REF] which allows for a better shape approximation. It has been extended to a 6 DOF robotic arm with an extruder [START_REF] Huang | Framefab : Robotic fabrication of frame shapes[END_REF]. The print time can also be decreased by substituting some part of the model with construction blocks (eg. Lego) [START_REF] Mueller | fabrickation : Fast 3d printing of functional objects by integrating construction kit building blocks[END_REF].

Model Decomposition

Usually, the build volume of filament printers is around 200 * 200 * 200 mm 3 . If the model is too large to be printed, it can be partitioned in smaller parts that will be assembled later. In other cases the user might want to decompose the model before the fabrication. For example mechanical parts might be fused together during the process, which will prevent them from working properly.

All parts have to be printable and it should be possible to assemble the final model from the parts. Such a partition can be done by taking into account the size of the parts, the interface between the parts, the robustness and the aesthetics of the assembled models [START_REF] Luo | Chopper : Partitioning models into 3D-printable parts[END_REF]. The model can be decomposed to save print time and to minimize support structure [START_REF] Vanek | Packmerger : A 3d print volume optimizer[END_REF]. The model can be decomposed and packed to be printed in a single print then assembled. Attene [START_REF] Attene | Shapes In a Box : Disassembling 3D Objects for Efficient Packing and Fabrication[END_REF] tackles the problem of shape segmentation and packaging to ship the model to a customer who will later assemble the parts. Dapper [START_REF] Chen | Dapper : Decompose-and-pack for 3d printing[END_REF] considers the problem of decomposing the input into pyramidal shapes, packed into the print bed using a voxel representation of the parts. The decomposition of the model can be computed to save space during the shipping to a customer [START_REF] Yao | Level-set-based partitioning and packing optimization of a printable model[END_REF]. The decomposed model can be assembled with small connectors [START_REF] Luo | Chopper : Partitioning models into 3D-printable parts[END_REF] or by creating interlocking parts [START_REF] Song | Printing 3D objects with interlocking parts[END_REF].

Physical Properties after Fabrication

We need to be sure that the target model is fabricable and that it will endure its intended everyday use. Stava et al. [START_REF] Stava | Stress relief : Improving structural strength of 3d printable objects[END_REF] introduce an optimization technique that optimize a model to ensure the physical integrity of a 3D printed model. Zhou et al. [START_REF] Zhou | Worst-case structural analysis[END_REF] perform a modal analysis to extract the weak region of a 3D model. Langlois et al. [START_REF] Langlois | Stochastic structural analysis for context-aware design and fabrication[END_REF] presents a method to compute failure probabilities with Finite Element Method (FEM).

The elastic models are deforming under gravity and the user has to predict the deformation and to edit the model such that the deformed model is the one that the user wants to build. Chen et al. [START_REF] Chen | An asymptotic numerical method for inverse elastic shape design[END_REF] presents a technique that computes automatically the inverse elastic shape.

There is a trade-off between the stress resistance of a 3D printed object and the amount of material that is used inside the model. By creating honeycomb patterns inside the model, one can reduce the amount of material with a little impact on the strength of the 3D printed model [START_REF] Lu | Build-to-last : Strength to weight 3d printed objects[END_REF].

Material Usage

The amount of material usage depends of the way the model interior is filled. Minimizing the amount of material inside the model minimizes also the fabrication cost (time and material) of the model. The techniques that tackle this challenge focus mostly the process stage.

Kisslicer, MakerBotDesktop, Cura 5 let the user choose the amount of plastic used inside the models. They use different infill patterns (e.g. straight line, Hilbert, honeycomb) and they do not truly ensure the printability of the model : when the inside is sparse, internal support might become necessary for the object tops. Wu et al. [START_REF] Wu | Self-supporting rhombic infill structures for additive manufacturing[END_REF] consider the optimization of a rhombic infill that ensures that the inner structure is self-supported. Kumar et al. [START_REF] Kumar | Fractal raster tool paths for layered manufacturing of porous objects[END_REF] uses hierarchical space filling curves to control the density of the infill pattern.

The minimization of material usage can also be done by hollowing the object to fasten print time and decrease the material usage. Hollowing is done by computing the offset surface of the model [START_REF] Farouki | Exact offset procedures for simple solids[END_REF][START_REF] Rossignac | Offsetting operations in solid modelling[END_REF]. The offset surface can be extracted from the distance field of the model.

The interior of a model can be filled with spare struss structure. Wang et al. [START_REF] Wang | Cost-effective printing of 3d objects with skin-frame structures[END_REF] optimize those truss to preserve rigidity and use the reduce the number of beams. Zhang et al. [START_REF] Zhang | Medial axis tree-an internal supporting structure for 3d printing[END_REF] uses the medial axis as a skeleton from which grows a tree like structure. Medeiros et al. [START_REF] Medeiros E Sá | Adaptive voids[END_REF] generate an adaptive tessellation of the interior, and offset the edges of either the primal or the dual to produce an inner beam structure. It allows to generate a denser structure along the shape boundary than inside. Lu et al. [START_REF] Lu | Build-to-last : Strength to weight 3d printed objects[END_REF] optimize for a Voronoi diagram inside the print, which faces form an infill pattern.

The complexity of the infill pattern might leads to an increase of the travel time. Yaman et al. [START_REF] Yaman | Slice coherence in a query-based architecture for 3d heterogeneous printing[END_REF] tackle this problem by printing the face of a Voronoi diagram. They use Euler loops to minimize path length in a graph where the edge are the face of a Voronoi diagram. It avoids travel move.

Planar cutting

Planar cutting is a subtractive technology. Usually, a panel made of wood, plastic or textile is cut into different planar parts that are assembled to build a 3D object. The cutting tool might be of different nature (laser, CNC, water jet, etc.). It requires to compute cutting paths like filament printers require to compute deposition paths for the extruder. The paths are not computed by exactly the same method however, as the tool in this case removes material, and issues such as oozing and zippers do not occur (see Figure 1.11).

Planar cutting is very common in many industries. It is used to fabricate wooden structures for boats, furniture, and to cut the fabric and the leather of our clothes. A complete overview would extend well beyond this thesis. This section thus focuses on the assembly of 3D shapes from 2D cutouts of rigid material like woods or acrylic, in the context of personal and hobbyist fabrication. Laser cut objects almost always require an assembly. Industrial use the technology to fabricate planar parts, present in boats or in textile industry. Clothes need to be sewn, and the wooden parts need to be assembled.

Modelling and fabrication with planar cutting

There are two main challenges in planar cutting. The first one is to design objects for planar cutting. The second one is to minimize the amount of wasted material. This section follows the same organization as Section 1.2. First, I present the challenges that are specific to this manufacturing technology, and for each challenge I present the techniques that have been used to solve them at process or design stage.

Modelling 3D shapes from 2D cuts

Modelling for planar cutting is not straightforward. This presents two major drawbacks : First the cut materials are thick (e.g. a few millimeters) and this thickness must be taken into account for the subsequent assembly. Second the cut parts are almost always planar, and this limits the design possibilities. Note however that it is possible to create a pattern with the laser that allows some deformation of the parts (See figure 1.12).

The planar cut parts can be created by the user through a modelling interface [START_REF] Mccrae | Flatfitfab : Interactive modeling with planar sections[END_REF][START_REF] Schwartzburg | Fabrication-aware design with intersecting planar pieces[END_REF][START_REF] Schwartzburg | Design and optimization of orthogonally intersecting planar surfaces[END_REF] or optimized to best capture a 3D model [START_REF] Hildebrand | Crdbrd : Shape fabrication by sliding planar slices[END_REF]. This optimization can be done with crossfield [START_REF] Cignoni | Field-aligned mesh joinery[END_REF]. The method from Mueller et al. [START_REF] Mueller | Interactive construction : Interactive fabrication of functional mechanical devices[END_REF] allows the user to draw directly shapes Figure 1.12 -Those boxes have been cut with a laser cutter. The pattern followed by the cutter allows some deformation that permit the user to close the boxes. (Things 17240 from Thingiverse, user bdahlem) on the laser cutter with different pens. Clothes are 2D shape, cut in leather or tailored from fabrics that are deformed afterwards to be assembled. Umetani et al. [START_REF] Umetani | Sensitive couture for interactive garment modeling and editing[END_REF] developed a technique to edit garment and model clothes. The method allows designers to edit a cloth by editing either the garment, or the 3D representation of the cloth.

The fabrication and assembly of a model with a laser cutter is usually faster than a 3D print. Beyer et al. [START_REF] Beyer | Platener : Lowfidelity fabrication of 3d objects by substituting 3d print with laser-cut plates[END_REF] present a technique that allows the user to replace the 3D printing by an assembly of laser cut parts. However, the fidelity of the cut model is lower than the quality of the 3D printed model. Mueller et al. introduced [START_REF] Mueller | Laserorigami : Laser-cutting 3d objects[END_REF] LaserOrigami that uses a planar cutter to produce 3D objects faster and without assembly. It works by changing the focus of the laser of the cutter to heat and bend the model.

Minimizing Wasted Material

Planar cutting is extensively used in several industries. When cutting parts from a rectangular piece of material, left over regions are wasted. This has a huge impact on cost as not only material is wasted, but also additional clean-up and waste handling is necessary. Thus, minimizing wastage has been studied in computer science since decades.

Process Stage

We need to pack the different cut parts in the (typically) rectangular cut area to waste the minimal quantity of material. This nesting problem is known NP-Hard [START_REF] Coffman | Approximation Algorithms for Bin-Packing -An Updated Survey[END_REF]. The packing algorithms are mostly heuristics however Fishetti and Luzzi [START_REF] Fischetti | Mixed-integer programming models for nesting problems[END_REF] proposed an exact solution based on Mixed Integer Programming. Some heuristic have been developed, in particular based on the Bottom Left placement rule. The idea is to place iteratively each piece in the left-most possible position. More recently Jones [START_REF] Jones | A fully general, exact algorithm for nesting irregular shapes[END_REF] proposed an algorithm based on the decomposition of the polygon into circles. An initial solution can be improved with compaction and separation algorithms [START_REF] Li | Compaction Algorithms for Non-convex Polygons and Their Applications[END_REF] that can be thought as if forces are applied on the parts to move them in the packing space. The interested reader can find a more detailed survey in the thesis by Antonio Martínez Sykora : "Nesting problem, exacts and heuristics algorithms" [START_REF] Sykora | Nesting problems Exact and heuristic algorithms[END_REF] or refer to the tutorial by Bennell and Oliveira [START_REF] Bennell | A tutorial in irregular shape packing problems[END_REF].

If a user wants to use a limited number N of panel to build an object, she has to edit her model manually until the packing algorithm found a solution for N panels. The chapter 3 of this thesis presents a technique that optimizes a shape to minimize the waste.

Design Stage Saakes et al. [START_REF] Saakes | Paccam : Material capture and interactive 2d packing for efficient material usage on cnc cutting machines[END_REF] present a method to reuse leftover of panels. The method is interactive and the user is placing the part that she wants to cut in a virtual version of the panel. The second chapter of this thesis presents a technique that performs design changes (within user defined bounds) to minimize the wastage of material with laser cut designs.

Shape Synthesis

"Form follows function" is a design philosophy that appeared in the 20th century [START_REF] Sullivan | The tall office building artistically considered[END_REF]. This is based on the fact that the form of a model depends primarily on its function. Sometimes, especially with non-experts, the user has no particular wishes about the shape of the model she wants to fabricate, however she knows precisely its intended function. In this case, the system has to create the geometry automatically from the function, without any other information. Designers call this process generative design6 . To solve this kind of problems and produce shapes automatically, scientists proposed several methodologies. I describe the most related to my work in this section.

Interestingly, the automatic synthesis of shapes (geometry and surface details) is a common problem in the video game and movie industries, see for instance the work of Ma et al. [START_REF] Ma | Game Level Layout from Design Specification[END_REF] where variants of game levels are produced from basic building blocks, or the work of Weta Digital [START_REF] White | King kong : The building of 1933 new york city[END_REF] that recreates 1933 New York City for the movie King Kong. However the goal is mainly about aesthetics and serving a story or gameplay. While it is time consuming to design a single shape, many scenes in video games or movies require a lot of different models of the same type (e.g. a forest with different trees).

Approaches for shape synthesis

Different techniques exist to represent shapes as parametric geometries, from which infinite variations can be explored. Below I mention some examples such as procedural modelling and by example synthesis.

Procedural Modelling

Grammar Procedural modelling techniques are based on the generation of content from a set of rules. Among them, shape grammars [START_REF] Stiny | Shape grammars and the generative specification of painting and sculpture[END_REF] consist of a set of rules that define how a shape can be transformed. A parametric, stochastic, conditional, context-free Grammar [START_REF] Talton | Metropolis procedural modeling[END_REF] is a tuple :

G = V, T, Σ, ω, P
where V is the set of variable, T is the set of terminals, Σ is the set of formal parameters, ω ∈ ((V ∪ T ) × R * ) + is the axiom and P ⊂ (V × Σ * × B × ) × ((V ∪ T ) × * ) * is a finite set of production rules. In this definition is the set of all correctly constructed arithmetic expressions with parameters from Σ. B is the set of all possible expression involving quantities form . A production rule ρ ∈ P begins with a predecessor and ends with a successor. A predecessor is defined by a variable, any number of formal parameters, a boolean condition on the formal parameters and a function R * → [0, 1] that specifies the probability of using the production rule. A successor is a set of variables or terminals.

Here is an example of a grammar :

V = {X}, T = {S, +, -, [, ]}, Σ = {l}, ω = X(1) P = X(l) : l ≤ 2 1-l/2 -→ F (l)[-X(l + 1)][+X(l + 1)] X(l) : l ≤ 2 l/2 -→ F (l)
To use the grammar and generate a shape, the idea is as follows. From the axiom, we apply a rule and build a new chain. The system applies rules until all symbols are terminals. The rules to apply are selected with some probability (written on the top of the arrow) and under some conditions (on the left of the arrow). An example of derivation is given Figure 1.13. We still need to generate a graphical content from the chain that have been constructed with the grammar. We can imagine a moving pen that interprets the terminal symbol as motion [START_REF] Prusinkiewicz | Graphical applications of l-systems[END_REF]. Grammars were introduced into the graphics community by Prusinkiewicz [START_REF] Prusinkiewicz | Graphical applications of l-systems[END_REF]. Early techniques were tailored to represent models of plants [START_REF] Prusinkiewicz | The Algorithmic Beauty of Plants[END_REF]. Using only deterministic L-System was not enough to represent the diversity of shapes that could be generated. Thus, the concept has been extended to stochastic and parametric versions that are now widely adopted. Later techniques incorporate constraints from the surrounding environment [START_REF] Prusinkiewicz | Synthetic topiary[END_REF]. Some techniques were dedicated to the generation of cities [START_REF] Parish | Procedural modeling of cities[END_REF]. Wonka et al. introduced split grammars to produce architectural models [START_REF] Wonka | Instant architecture[END_REF]. Grammars have also been used to represent ornamental structures [START_REF] Wong | Computer-generated floral ornament[END_REF]. The derivation and the parameter of a L-system can be controlled with a probabilistic model to optimize an objective [START_REF] Talton | Metropolis procedural modeling[END_REF].

The question of defining the set of rules remains. Indeed, in most of the case the grammar is handcrafted and it requires a lot of effort and knowledge about the application domain and the desired shapes. It can be defined by the user through high level specification languages or, in most of the case it is defined beforehand. Recent works consider inverse procedural modelling to generate the grammar automatically from given 1.4. Shape Synthesis input shapes. I mention some of these techniques in the following section, which considers by-example modelling techniques.

By Example Modelling

By example modelling of shapes consists in using a shape (or a set of shapes) to produce a variety of novel shapes. The early work of Funkhouser et al. [START_REF] Funkhouser | Modeling by example[END_REF] is a great example is this methodology : the work introduces a modelling tool that is able to cut and mix different shapes, and also gives the possibility to search for similar shape (sub)parts using similarities metrics.

Inverse Procedural modelling represents a set of techniques that generate a procedural model (grammar) from existing content. Stava et al. [START_REF] Šťava | Inverse procedural modeling by automatic generation of l-systems[END_REF] shows a method to automatically build L-Systems from 2D shapes. The analysis relies on self-similarities detection techniques [START_REF] Mitra | Symmetry in 3D Geometry : Extraction and Applications[END_REF][START_REF] Bokeloh | A connection between partial symmetry and inverse procedural modeling[END_REF]. This is a vast domain of research, interested reader can refer to the SIGGRAPH course by Aliaga and colleagues [START_REF] Aliaga | Inverse procedural modeling of 3d models for virtual worlds[END_REF].

Part-based modelling relies on the decomposition and assembly of a large dataset of models. Whereas the segmentation is mandatory, it is often done manually by the users [START_REF] Funkhouser | Modeling by example[END_REF]. Kreavoy et al [START_REF] Kreavoy | Model composition from interchangeable components[END_REF] present a technique to segment the input mesh into a meaningful decomposition. The user can assemble the different parts through an interface that presents the most probable part to place next [START_REF] Chaudhuri | Probabilistic reasoning for assembly-based 3d modeling[END_REF], but the synthesis can also be done automatically. Zheng et al. [START_REF] Zheng | Smart variations : Functional substructures for part compatibility[END_REF] present a method that uses symmetry information to mix different parts of different models together. Kalogerakis et al. [START_REF] Kalogerakis | A probabilistic model for component-based shape synthesis[END_REF] present a method to obtain probabilistic model by segmenting and analysing shapes from the same domain. While inverse procedural modeling relies on the study of one model to generate the grammar, their technique uses more models allowing to generate more varied content.

Texture synthesis The synthesis of textures from examples is also a typical problem in computer graphics. The purpose of those techniques is to generate large non-repetitive images of materials (wood, rocks, carpet) from small samples. The generated image has to be similar to the example such that a human observer thinks it represents the same material. The interested reader can refer to the survey by Wei and colleagues [START_REF] Wei | State of the art in examplebased texture synthesis[END_REF] on this extensively researched topic. Similar techniques have been proposed by Perlin and Hoffert [START_REF] Perlin | [END_REF] to synthesize volumes with a procedural method or to produce variations in geometry across a surface [START_REF] Bhat | Geometric Texture Synthesis by Example[END_REF]. Merrel and Manocha [START_REF] Merrell | Continuous model synthesis[END_REF] use the adjacency information of the edges, the faces and vertices of a 3D mesh to generate various shapes. More recent work focuses on microstructures generation to change the physical properties of a fabricated object [START_REF] Martínez | Procedural voronoi foams for additive manufacturing[END_REF].

Many approaches have been proposed to generate virtual content. Those techniques initially targeted video games and cinema industries, and need to be adapted if they are used to produce fabricable designs. Indeed, the fabrication constraints and the user intents need to be integrated into the synthesis.

Integrating the fabrication aspect in methods for modelling by example has been studied. For example, Yang et al. developed [START_REF] Yang | Reforming Shapes for Material-aware Fabrication[END_REF] a technique that changes a shape such that it will look as if it has been fabricated with a different material than the original shape (e.g. reforming a chair in wood to show how it will look in wrought iron). Schulz et al. [START_REF] Schulz | Design and fabrication by example[END_REF] extended by-example modelling [START_REF] Funkhouser | Modeling by example[END_REF] with information about fabrication (in particular connectors) in order to produce fabricable models. Shugrina et al. [START_REF] Shugrina | Fab forms : Customizable objects for fabrication with validity and geometry caching[END_REF] presented a technique to maintain the validity and ensure that a parametric design customized by a novice user is fabricable. AutoConnect [START_REF] Koyama | Autoconnect : Computational design of 3d-printable connectors[END_REF] synthesizes a 3D printable connector between two objects.

Synthesizing from functional specification

There exist other synthesizing techniques that create a shape by optimizing an objective function. Topology Optimization [START_REF] Bendsøe | Optimal shape design as a material distribution problem[END_REF][START_REF] Sigmund | A 99 line topology optimization code written in matlab[END_REF] typically synthesizes a shape by maximizing its rigidity (other objectives are possible). Given the boundary condition and a set of loads it computes the shape with minimal compliance energy. The Solid Isotropic Material with Penalization (SIMP) approach formulates the problem as a material distribution problem. The domain is discretized into a regular grid of elastic elements with varying densities in [p min , 1]. The density of each element is optimized with a gradient descent on the compliance energy. Unfortunately this gradient descent is not straightforward. The density takes value between [p min , 1], which have no real meaning because we cannot fabricate composite material on most technologies (see Figure 1.14, left). To avoid this, p is replaced by p 3 in the optimization. Doing this produces a checkerboard pattern (see Figure 1.14, center). This pattern is problematic because it appears independently of the size of the element. However, it can be filtered by using the average gradient of the neighbourhood of each element (see Figure 1.14, right). The interested reader can refer to the review by Sigmund and Maute [START_REF] Sigmund | Topology optimization approaches[END_REF].

Topology optimization is a great tool but it is hard to combine it with a desired appearance. It is also time consuming because it requires the results of the FEM simulation to compute the gradients, at each iteration of the optimizer. Those limitations hinder the participation of the user in the design process. She only determines the boundary 1.5. Shape Enhancement conditions of the problem and waits for the result. Topology optimization has been used a lot recently in graphics community [START_REF] Wu | A system for high-resolution topology optimization[END_REF][START_REF] Christiansen | Combined shape and topology optimization of 3d structures[END_REF][START_REF] Martínez | Structure and appearance optimization for controllable shape design[END_REF].

It is not easy for a user to drive a system that fully automatically synthesizes shapes. The synthesis can be constrained, and additional objectives added, but the system often proposes a single solution. This particular answer might not suit exactly the user intent. In this case, one alternative is to rely on shape enhancement techniques to refine a base shape provided by the user. I present such approaches next.

Shape Enhancement

The boundary between shape enhancement and shape synthesis is not strict. I call "shape enhancement" the set of techniques that require partial information about a shape to work. If the user knows what parts of the shape looks like, she will not use shape synthesis techniques because they are not easily constrained by partial -but preciseinformation. In this case shape enhancement is better suited. The shape emerges from lower level partial specifications (e.g. a mesh, a drawing, a set of 2D curves) as opposed to synthesis techniques that require high level specifications (e.g. loads in space, grammar describing a space of shapes, etc.). Lower level specification can also be used to guide a grammar : Nishida et al. [START_REF] Nishida | Interactive sketching of urban procedural models[END_REF] use sketches to determine derivation of a grammar, showing that low level specification can guide a synthesis system.

Automatically enhancing a design has been studied in computer graphics in a wide range of applications to make designers life easier. A classical example is inpainting [START_REF] Bertalmio | Image inpainting[END_REF], that reconstructs a deteriorated image. There are also work on geometry cloning [START_REF] Takayama | GeoBrush : Interactive Mesh Geometry Cloning[END_REF] that allows the user to clone the detail of a surface of a 3D model on another. We can also cite sketch-based modelling tools that use sketch to produce 3D models [START_REF] Paoli | Secondskin : Sketch-based construction of layered 3d models[END_REF][START_REF] Xu | True2form : 3d curve networks from 2d sketches via selective regularization[END_REF]. The interested reader can refer to the survey by Olsen et al. [START_REF] Olsen | Sketch-based modeling : A survey[END_REF].

A first approach to design enhancement is to start from an existing geometry and modify it through deformation or other geometric operations to achieve the user intent.

When the 3D model is given by the user, it can be deformed to match the real world constraints. A volume can be optimized to balance it, by carving inside and deforming its surface [START_REF] Prévost | Make It Stand : Balancing shapes for 3D fabrication[END_REF]. The optimized volume remains 3D printable. A volume can be deformed to optimize rotational properties and inertia [START_REF] Bächer | Spin-it : Optimizing moment of inertia for spinnable objects[END_REF] or the buoyancy of a fabricated part [START_REF] Wang | Buoyancy optimization for computational fabrication[END_REF]. Zhou et al. [START_REF] Zhou | Boxelization : Folding 3d objects into boxes[END_REF] introduced boxelization which is a method to transform an object in a box by folding the different parts of the model. The object can be fabricated and transformed from a shape to the other.

User involvement Shape enhancement techniques allow more user involvement than automatic synthesis techniques, and that makes the process more controllable. The user can be involved in the design process to different degrees or at different times. In some techniques he is guided in the exploration of the design space.

The user might be involved at the beginning of the optimization. She specified entirely the input of the algorithm which generates the model [START_REF] Wang | Buoyancy optimization for computational fabrication[END_REF]. She might be able to interact with the final model to deform it [START_REF] Prévost | Make It Stand : Balancing shapes for 3D fabrication[END_REF]. The solution can be generated in real time as she is modifying the initial model through an interface [START_REF] Coros | Computational design of mechanical characters[END_REF]. Ion et al. introduced a specialized 3D editor to allow the user to create mechanical object with metamaterial [START_REF] Ion | Metamaterial mechanism[END_REF].

Focus While applicable to many different domains, I noticed two cases where shape enhancement techniques are particularly relevant. The first is mechanism design : designing mechanism for additive manufacturing is a complex task that requires knowledge in mechanics, 3D printing and proficiency with modeling tools. Simplifying the design stage is important. The second domain is furniture design. Furniture is ubiquitous in our lives, and there are many case where one would like to design a custom furniture. Yet, designing durable, fabricable, low-cost furniture is a difficult modeling task. In computer graphics and fabrication, the design of mechanical models has been largely studied. Duygu et al. [START_REF] Ceylan | Designing and fabricating mechanical automata from mocap sequences[END_REF] propose a system that can embed an oscillation module in an animated character to reproduce the motion of a motion capture sequence. Calì et al. [START_REF] Calì | 3d-printing of non-assembly, articulated models[END_REF] propose a method that helps the user to add articulations on a Rigged 3D model in order to fabricate an articulated character. Skouras et al. [START_REF] Skouras | Computational design of actuated deformable characters[END_REF] optimize a material distribution and the positions of actuators in a shape to reach deformations specified by the user. Zhu et al. [START_REF] Zhu | Motion-guided mechanical toy modeling[END_REF] introduce a method that synthesize a mechanical toy that reproduce the motion of an animated input. Through a design system, a user is able to models craftable character with planar motion [START_REF] Megaro | Chacra : An interactive design system for rapid character crafting[END_REF]. Thomaszewski et al. [START_REF] Thomaszewski | Computational design of linkage-based characters[END_REF] present a system that allows the user to interactively build a moving character from an animated character. Ureta et al. [START_REF] Ureta | Interactive Modeling of Mechanical Objects[END_REF] introduce an interactive system that helps the user to create joints between different moving parts.

Assisted design of mechanisms

Positioning of my contributions

Mechanical Layout

Computational design of mechanical character [START_REF] Coros | Computational design of mechanical characters[END_REF] presents a method that synthesize a mechanism from a user input. The user interactively animate an articulated character by drawing motion curves for different parts of the model. Then the system generates a mechanism whose motions follow the drawn curves. This generation is done by optimizing the parameters of parametrized small mechanisms that are given as input.

Once the elementary mechanisms are optimized, their relative positions is determined such as to prevent intersections between their respective components. There are two main ways intersections can occur between parts (Figure 1.15). If two parts are colliding, and if a third part intersects a pin between two other parts. The problem of placing the different parts in different layers is highly combinatorial and a brute force approach is not applicable. The layering problem presented in [START_REF] Coros | Computational design of mechanical characters[END_REF] is solved by a Constraint Satisfaction Problem (CSP). Since their formulation requires the number of layers in the mechanism, the solution they proposed optimizes the number of layer by trying to solve the CSP several times. When the problem has no solution, they increase the number of layer and solve again. The different mechanical parts are integrated in the model and are hidden in a gear box. This algorithm cooperates with the user to design the motion of the mechanism. It requires a bit of artistic bent which may appear as a limitation or an advantage depending on the target audience.

Assisted design of furniture

Designing a furniture can be a hard task. Usually, the designer considers aesthetics and rely on a physical simulator to validate the physical properties (e.g. Finite Element Method). Some recent research integrated the physical analysis in the design process. Umetani et al. [START_REF] Umetani | Guided exploration of physically valid shapes for furniture design[END_REF] propose a method where the user participates in the design process and the interface helps her to model feasible furniture by analyzing the physical validity of the design. This is defined by the durability of the joints between the different parts of the planks and the stability of the model. Lau et al. [START_REF] Lau | Converting 3d furniture models to fabricatable parts and connectors[END_REF] convert a 3D model of furniture in fabricable parts and connectors. The system decomposes a voxel representation of the 3D model. It parses this decomposition performing a lexical analysis to obtain a graph. The graph is augmented by information about the connection between the different parts. Koo et al. [START_REF] Koo | Creating works-like prototypes of mechanical objects[END_REF] compute a model from high end specifications provided by a designer. The designer places several boxes in space and choses the different interactions between those boxes. Then the system optimizes the parts and joints to generate a fabricable model. Saul et al. [START_REF] Saul | Sketchchair : An all-in-one chair design system for end users[END_REF] present an interface that allows the user to control entirely the process of designing and building a chair. This tool allows users to sketch the planar parts that compose the chair. Li et al. [START_REF] Li | Foldabilizing furniture[END_REF] introduce a method to compute foldable furniture from a partitioned input shape.

Positioning of my contributions

In my contributions I explored along the cursor from the machine to the user. The next section lists my contributions, from the closest to the machine to the closest to the user.

Clean Color presents a technique that deals with the defects that appear with Fused Filament Fabrication. By changing the paths followed by the print head and optimizing the part orientation we minimize the surface imperfections. This technique optimizes the process but it does not impact the design. It has been done with my advisor and has been published in Computer Graphics Forum, special issue of Eurographics 2014 [START_REF] Hergel | Clean color : Improving multi-filament 3d prints[END_REF]. It is presented in the Chapter 2.

2D Fabrication of 2D Mechanism computes a fabricable mechanism from a partial 2D blueprint. It computes the layout of the different parts from the simulation of the mechanism. It helps the user design pre-assembled 3D printed mechanisms by taking most of the fabrication constraints into account. It has been done with my advisor and has been published in Computer Graphics Forum, special issue of Eurographics 2015 [START_REF] Hergel | 3d fabrication of 2d mechanisms[END_REF]. It is presented in the Chapter 3.

Towards Zero Waste Furniture Design presents a technique to optimize parametric models of planar cut designs in order to minimize the amount of wasted material. Unlike previous work, the technique changes the model given by the user -within specified bounds. It is at the boundary between the design stage and the fabrication stage. It has been accepted with major revision at Transactions on Visualization and Computer Graphics. It has been done in collaboration with Bongjin Koo, Niloy Mitra and Sylvain Lefebvre. It is presented in the Chapter 3.

Synthesis of User-Friendly Shelf presents a technique that synthesizes complete shelves from user input. After the synthesis, the user is able to deform the furniture to achieve different purposes (e.g. minimizing material, improving aesthetics). It covers almost all the design stage, while still synthesizing a shape that is easy to manipulate for the user. This work will be submitted early 2017. It has been done in collaboration with Niloy Mitra and Sylvain Lefebvre. It is presented in the Chapter 4.

Improving the 3D printing process

Introduction

Rapid digital manufacturing holds the promise to let artists and hobbyists create complex, intricate designs. This extends beyond the geometry to the material properties of an object, with the ability to use different materials in different areas, locally changing properties such as color, elasticity, opacity or even conductivity 7 .

A major advantage of filament printers is that they can easily be equipped with multiple extruders to print using different materials. However, as I have discussed before in Section 1.2 of the state of the art (see also Figure 1.6), there are several challenges hindering the fabrication of high quality parts using multiple filaments.

One could argue that high-end industrial printers would be better suited to this task. However, only few processes can change the material properties during printing. Most are limited to colour gradings, such as the ZCorp 8 and MCor 9 printers (the first uses ink to colour the powder before binding, the second creates objects by layering paper and prints a colour pattern on each sheet). The others, such as the Objet Geometries printers 10 or the MultiFab printer [START_REF] Sitthi-Amorn | Multifab : A machine vision assisted platform for multi-material 3d printing[END_REF] print with different materials by projecting droplets of different resins. However, all of these technologies are expensive to acquire and operate, and require special training and facilities (in particular, resins and powders have to be handled with care).

In contrast, filament based printers are easier to handle and assemble/modify, inexpensive, wide spread, and do not require specific precautions beyond a well ventilated area. This could be one of the reasons why the technology blossomed during these past years.

I therefore considered how to improve the quality of multi-material prints on filament printers. I chose to not modify the hardware in any way in order to keep it simple and 7. https://www.proto-pasta.com/pages/conductive-pla 8. http://www.3dsystems.com/3d-printers/professional/projet-460plus 9. http://mcortechnologies.com/3d-printers/ 10. http://www.stratasys.com/3d-printers/design-series/objet30-pro This chapter presents a technique that is closer to the printer than to the user : it is a process stage technique and strives to accurately reproduce the input design. For clarity in the remainder of the chapter I often refer to different materials has different 'colors'. It is to be understood, however, that each colour could be a different material supplied as a filament.

This work has been done with my advisor and has been published in Computer Graphics Forum, special issue of Eurographics 2014 [START_REF] Hergel | Clean color : Improving multi-filament 3d prints[END_REF].

Overview

Our algorithm targets low-cost FFF printers of the RepRap family, equipped with multiple extruders. We focus our explanations on dual printing (two extruders), but our approach can be adapted to more extruders. The extruders are mounted on a single carriage at a fixed offset δ (2D vector). We denote by δ i the offset of extruder i, with δ 0 = 0 and δ 1 = δ.

The input to the slicing process are two meshes, each describing the volume in space to be filled with the corresponding color/material. An example is given Figure 2.1. We name the meshes M 0 , M 1 and refer to the volume enclosed by each as respectively V 0 , V 1 . We assume non self-intersecting watertight meshes, with

V 0 ∩ V 1 = ∅.
To understand our approach, let us consider the major defect : strings of plastic deposited by oozing extruders. Strings are deposited in two circumstances, which we will refer to as Case 1 and Case 2 throughout the text :

-Case 1 Travel moves (no extruder prints, all ooze). This is illustrated Figure 2.2, left.

Optimizing print azimuth

-Case 2 Print moves (one extruder prints, others ooze). This is illustrated Figure 2.3, left. Case 1 is addressed by our path planner (Figure 2.2 right, Section 2.4). It navigates around the part while avoiding strings to deposit, finding travel paths where the idle extruder stays away from the print. If no such path can be found, our planner favors string deposition on matching colors. In last resort, it will always favor deposition in low visibility areas.

Case 2 is more constrained : the input printing paths cannot be changed. We address this in two ways. First, we minimize such cases through azimuth optimization (Section 2.2) and second, we create a rampart in close proximity of the shape, wiping extruders before they reach the surface (Figure 2.3 right, Section 2.3).

The planner and the rampart work in conjunction : the planner uses the rampart for circulation around the part. Each time an extruder crosses a rampart wall, it is wiped cleaned of any oozing string. In addition, we exploit the time during which the extruder circulates within the rampart to perform a refill : we run plastic through the extruder to refill the hot plastic chamber and keep it ready for printing. This prevents holes from appearing.

Optimizing print azimuth

For clarity let us consider the case of two extruders separated along the X print axis. We refer to them as the left and right extruders. Whenever the right extruder prints, the left extruder creates a ghost image of the print shifted by δ on the left. This ghost represents the locus of the points that may suffer color smears if the left extruder starts to ooze. Depending on the part size and azimuth, the ghost image will interfere (intersect) with what the right extruder is printing. Minimizing the size of this region will reduce the chance that smears occur. This is illustrated in Figure 2.4.

We perform the change of azimuth by a rotation of the object around the Z-axis of angle Θ, noted in matrix form as R Z Θ in the following. We do not change the vertical orientation of the part (Section 1.2.1.1).

By reasoning throughout all the print layers, for a given orientation angle Θ the total size of the interference region due to the left extruder is the volume

I L (Θ) = R Z Θ × V R ∩ T X δ × R Z Θ × V R
where T X δ is a translation matrix of δ along the X-axis. Similarly, the interference region due to the right extruder is

I R (Θ) = R Z Θ × V L ∩ T X -δ × R Z Θ × V L .
We therefore search Θ min such that :

Θ min = argmin Θ (I R (Θ) + I L (Θ))
In general computing the volume of the intersection between two meshes is a difficult problem. We rely on an approximate computation based on boolean mesh operations with dexels [START_REF] Van Hook | Real-time shaded nc milling display[END_REF]. This integrates very well within our slicer which also relies on this principle to extract slices [START_REF] Lefebvre | Icesl : A gpu accelerated modeler and slicer[END_REF]. The best angle is selected after testing for all angles by 10 degree increments.

Figure 2.5 shows an example of optimized azimuth angle. A better azimuth angle strongly reduces the defects due to Case 2. However, they often cannot be entirely suppressed in particular on large parts. The rampart, described next, further reduces these defects.

Rampart

Figure 2.5 -Robot-ice (user Ultimaker on Youmagine) : this model is larger than the spacing between the extruders, and its default azimuth results in significant color smears. Our azimuth optimization finds an angle avoiding these entirely.

Rampart

The rampart is a disposable structure built around the part. Its primary purpose is to catch the oozing strings before they reach the part (Case 2, Figure 2.3). Its secondary purpose is to provide a space where extruders can be refilled with plastic.

We construct the rampart in close proximity of the part. This allows to wipe the extruders clean as close as possible to the surface, and also keeps travel time low by avoiding traveling to a distant wipe station. Geometry : The outline of the rampart is obtained by rendering the part as seen from above, in black on a white background. We process this silhouette image to only keep the connected component containing the image border (inner holes are removed). The remainder is then offset towards the outside to obtain the contour of the first wall of the rampart. Another offset gives the second wall. We use 2 mm between the part and the first wall, and 4 mm for the inner spacing. These contours are added to each layer at all heights, creating a vertical extrusion of the rampart contours. Printing : The walls of the rampart are built at the start of each layer. Having the walls reach the tips of the extruders ensures proper wiping. We print the rampart at high speed (120 mm/sec), using a different extruder for each wall. One subtlety is that while a rampart wall is printed, the other extruder may move over the part -risking ooze to deposit. We have to ensure that it will be properly wiped before reaching the part. Our approach is simple : we start printing the wall from a location which guarantees that the other extruder reaches the rampart before the print. On our dual-extruder printer, when the right extruder is used we start printing the rampart from its leftmost point, and vice versa.

Path planning for multiple colors

The azimuth optimization and the rampart reduce defects due to Case 2, where strings are deposited by the idle extruder while the other one prints. We now consider Case 1, The path planner chooses in which order the print paths are visited, the point where to start printing each, and the travel path for moving from a print path to the next. We design our planner under the worst case assumption that idle extruders are always oozing. Our strategy is therefore to always avoid having the idle extruders cross over the part. In cases where crossing over the part is mandatory, we hide defects in low visibility regions. In addition our path planner exploits the rampart, circulating within its double walls. This encourages wiping and reduces the quantity of oozing : even if the idle extruder crosses over the part, the defect will be minimal. Each time an extruder travels within the rampart we perform a refill of its hot plastic chamber, ensuring that it is always ready to print.

Overview

After slicing, we obtain a set of 2D slices, generated from the input 3D models. In our slicer each slice is a set of paths, tagged with an extruder id and a type. The path type can be either of perimeter, shell, or infill (Figure 2.1). Recall that most print paths are cyclic and therefore we can freely choose their start/end point when printing.

Conceptually our algorithm works in high resolution images representing the slice. We set the resolution to 0.05 mm per pixel, which for a nozzle of size 0.4 mm covers 8 × 8 pixels. This offers enough resolution for detailed prints. Our slicer generates paths by contour tracing the slice images ; the paths are therefore sampled at the pixel resolution.

In addition to the slices we also consider the visibility volume computed from the surface, using ambient occlusion (AO) -an example is shown in Figure 2.8. This sparse 3D grid defines in every surface point a visibility coefficient. This determines whether a point along a perimeter is highly visible. We do not describe here the computation of the visibility volume and refer the reader to the survey on ambient occlusion techniques by Méndez-Feliu et al. [START_REF] Méndez-Feliu | From obscurances to ambient occlusion : A survey[END_REF]. In this volume, at any point in space we store a value between 0 Figure 2.9 -Left : Print paths for both extruders. Right : During printing, we consider the motion of extruder 0 only. The plain and dashed blue lines reveal its trajectory. However, when printing in green extruder 1 is activated, depositing plastic at the correct location (plain green line). and 1 ; 1 being the value for the most visible point.

The toolpath planning problem is a constrained form of TSP (See Section 1.2 of the state of the art). Solving directly with a TSP heuristic poses several difficulties. First, we need to consider a large number of nodes : paths have to be finely sampled to properly take into account visibility. Second, TSP is a global compromise between the order with which paths are printed and the navigation between them, while we want to favour quality over print time (within reasonable bounds) : navigation is of primary importance. Therefore we divide the problem in two distinct steps :

1. Ordering of paths, described in Subsection 2.4.3 ; 2. Navigation between paths, described in Subsection 2.4.4.

The ordering step decides the order in which print paths will be visited. The navigation is solved in a second step, maximizing the quality while taking into account the travel time. The benefit of resolving ordering first is to let us formulate the navigation optimization as a shortest path search in a graph, obtaining a high quality solution.

After these two steps we obtain a complete set of toolpaths, including travel paths that avoid or hide print defects.

Handling of multiple extruders

Our path planner always keeps track of the position of all extruders. However, all coordinates are rewritten using extruder 0 as the reference. The print paths for the other extruders are therefore translated into the frame of reference of extruder 0, as illustrated in Figure 2.9. When printing with extruder 1, the carriage will move along a trajectory defined for extruder 0, but extruder 1 will be extruding plastic at the correct location.

Ordering of perimeters

Our ordering step makes sure that paths are visited in reverse order of inclusion, from the inner-most towards the exterior of the slice. This ordering avoids an extruder to have to re-enter a region whose perimeter was just printed.

Since some regions can enclose multiple child regions, we also have some degrees of freedom in the ordering. We exploit these to further minimize the risk of defects, in particular holes due to missing plastic.

Inclusion tree. Most of the paths, with the exception of infills, are cycles which follow the hull of the surface. We organize the slice into zones, where each zone is a region separated by a print path. This is illustrated in Figure 2.10, left.

The notion of zone is well defined since, by construction, paths do not intersect : they capture the contours of the intersection of a plane with a well defined interior-exterior mesh. Infill paths are generated by the slicer only within the inner parts. In case of thinfeatures paths may come in contact with each other, but do not cross.

Similarly to prior work, we build a tree representing the zones with the most exterior zone at the root (Figure 2.10, right). The tree contains two types of nodes : zone nodes and path nodes. Each parent zone node is separated from a child zone node by a path node, indicating which cycle separates both zones in the slice. The infill paths are attached to the zone representing the inside region they are filling. The tree is quickly built with a floodfilling algorithm in the sparse image of the slice, tracking which paths are neighbouring each zone.

Ordering children in a zone. Zones of the inclusion tree may have multiple child paths (Figure 2.10, right). We can freely choose in which order these children are printed.

Their ordering is not without impact on quality. In particular, the risk of holes can be reduced by printing long paths first : any lack of plastic is more likely to go unnoticed. Indeed, the inner-most paths are infills and shells (and therefore invisible). Note that lack of plastic is a rare event since our path planner encourages the use of the rampart, where refills occur.

We therefore order the children by decreasing path length. Once the children of all zones have been ordered, we traverse the tree in post-order, gathering all paths. For the example Figure 2.10, the final print order will be F0,F1,F2,D,B,C,A.

Navigation

After the order is determined we obtain a sequence of paths to be printed. We seek to generate travel paths in between. Each will navigate from one print path to the next, minimizing defects, using the rampart for circulation, and maintaining the print time low whenever possible.

We optimize for navigation by a Dijkstra algorithm in a navigation graph comprising the paths to be printed, as well as a number of additional navigation pathways. The Dijkstra algorithm traverses the graph from one print path to the next, constrained by the order computed previously. Note that it computes a single navigation path and therefore The optimized navigation path is only concerned with travel : it is enough to reach the start of a print path and resume from its end, or to reach any single point along a cyclic print path -the extruder resumes from the same location after printing the cycle.

Navigation graph. The navigation graph has a sparse set of nodes which are located at integer coordinates in a grid. Multiple nodes can occupy a same coordinate. The resolution of the grid matches the resolution of the slice, with a larger extent to take into account the motion of all extruders. A node in the graph represents the reference extruder positioned at this location. Nodes are connected through edges representing segments in the plane. The cost of edges takes into account the defects that can occur when traveling this edge, considering the position of all extruders.

The construction of the graph is described in the next paragraphs. An example graph is shown Figure 2.11.

Print paths. We insert in the graph the paths along which plastic has to be deposited : cyclic paths are rasterized into the grid, adding nodes and edges between neighbors. We only add the start/end points of open paths.

Navigation paths. It would be wasteful to add one node per grid coordinate in the graph for navigation : once optimized, travel paths use only a small set of optimal pathways to navigate around different regions of the part. To speed up computations we explicitly select a small number of pathways and connect them to form the complete navigation graph.

We form the navigation pathways by adding to the graph a set of nodes N . We start by inserting the nodes corresponding to multiple versions of the print paths, each translated in the reference frame of one extruder (dashed lines in Figure 2.9).

We call these the ghost paths. Even though they are navigation paths they generally incur a large cost since they correspond to cases where an extruder passes over a mismat- ching color. They serve their main purpose at the next stage, when constructing additional navigation paths going around print and ghost paths as illustrated Figure 2.12.

We next compute a distance field in the grid [START_REF] Danielsson | Euclidean Distance Mapping[END_REF], from all path nodes added so far (print and ghost). The distance field indicates for each empty cell at coordinate e in the graph grid, the vector d(e) to the closest cell occupied by a node n = G(d(e)), with G the graph grid.

Using the distance field, we select a number of additional nodes : We form go-around pathways by selecting nodes at a fixed distance in the distance field (we use 4 times the nozzle width). We also form pathways between print paths, selecting the medial axis of the distance field -that is, selecting the nodes on either side of the medial axis which is located along integer cell edges. Finally, we add nodes for the path enclosed within the rampart, again in multiple versions translated in the frame of reference of each extruder. This provides a circulation around the part regardless of which extruder is active. Figure 2.11 shows the nodes of a complete navigation graph.

Edges. We next add edges in the graph. Edges are always added in both directions (a → b and b → a).

First, all nodes at neighboring integer coordinates are connected. Second, we connect the navigation nodes N to the rest of the graph, adding edges (n, G(d(n))), with n ∈ N . Finally, the navigation nodes are connected together : For each node n ∈ N we gather the set of nodes

C(n) = {m ∈ N |n = m, G(d(n)) = G(d(m))}.
These are the navigation nodes having the same closest node as n. We then add all edges {(n, m)|m ∈ C(n), d(n) • d(m) > 0.5}, where "•" denotes the scalar product. This connects n to the other navigation nodes that are on the same side of the node G(d(n)), within a tolerance.

Edge costs. The cost of following an edge between nodes p → q in the graph is :

c(p → q) = W d * d(p, q) + T (p → q)
with d(p, q) the Euclidean distance between the grid coordinates of p and q normalized by the largest extent of the slice, and W d a weight allowing to trade between travel time and quality (we use W d = 0.1). The term T is computed as :

T (p → q) = E i (M i (q + δ i ) • ao(q + δ i ) + Z(p + δ i → q + δ i ))
where M i (q + δ i ) checks in the slice image whether at position q + δ i the extruder number i is above a mismatching color. If that is the case, then M i (q + δ i ) = 10 and 0 otherwise. ao(x) returns the value at coordinate x in the AO grid. In case no value is available at x we search for the closest value in a small neighborhood (nozzle width), and return 0 if none is found. The ao(q +δ i ) factor thus modulates the penalty in function of the visibility of the point.

Z(u → v) takes into account edges entering or exiting print paths. These are the locations where zippers may occur and strings may deposit. Therefore, it is defined differently depending on the type of edge :

Z(u → v) =        0 if the edge u → v does not exist ao(u) if u on print path, v on navigation ao(v) if v on print path, u on navigation 0 otherwise
Our edge cost favors travel paths avoiding strings to deposit : the term M i strongly penalizes any crossing of an extruder above a print path of a different color. In all other cases the term Z(u → v) ensures that defects (zippers, strings) will be located in low visibility areas, as given by ambient occlusion.

Edges belonging the rampart pathway have a smaller cost (10 times smaller) to encourage their use.

Shortest path optimization. We solve the navigation problem by searching for the shortest path from the start point of the slice, through all print paths, to a point of the last print path. We select the start point from the end point of the previous slice, or the origin for the first slice. The path is constrained to traverse the print paths in the order defined by the ordering step. Open paths are visited as soon as their first point is reached, and the shortest path search resumes directly from their last point. Cyclic paths can only be considered visited when all their nodes have received their shortest path cost.

We backtrack the overall shortest path from the node of the last perimeter having smallest cost. The shortest path goes through one node of each cyclic print paths and the first/last node of non-cyclic paths. The sequences of nodes between each print path node form travelling paths. We insert them into the initial sequence of paths to obtain the final sequence of paths. These are then used to produce the instructions for the printer (G-code).

Triggering refill

The path planner generates travel paths that tend to circulate within the walls of the rampart. After path planning, we follow each travel path and detect when it enters/exits the rampart. We then activate the extruder which circulates the rampart, allowing plastic to flow. This is illustrated in Figure 2.6.

Our goal is to run a sufficient volume of plastic through the nozzle to properly refill the hot chamber. Since the travel path within the rampart is already determined, we can only vary the travel speed or the extrusion speed. We use a fixed extrusion speed ensuring reliability. We therefore adapt the travel speed. Given a path length L (mm), a volume to push v (mm 3 ), a filament extrusion speed e (mm/s), and a filament diameter f (mm), we compute the travel speed as :

s = L • e • π • f 2 4 • V
For mechanical safety we ensure the speed remains below a maximum (120mm/s). This guarantees that enough plastic is pushed, regardless of the length of the segment within the rampart. We use v = 2mm 3 and e = 2mm/s. While it is possible for several refill paths to overlap, we did not find that to be a source of concern during printing -however we disable refill on the first few layers where the nozzle is close to the print bed.

Results

Results

We implement our method in our slicer [START_REF] Lefebvre | Icesl : A gpu accelerated modeler and slicer[END_REF]. We print on a Replicator 1 dual with Sailfish 7.4, using ABS plastic.

Our prints are all obtained with same values for all parameters. Our parameters are 30 mm/s for perimeters, 60 mm/s for other print paths, 120 mm/s travel, 20% infill and 2 shells, 0.5mm prime/deprime. All the results shown in this chapter are exactly as they came out of the printer : we do not clean them in any way.

Figure 2.20 shows how zippers are hidden in low visibility regions by the edge cost defined Section 2.4.4. This benefits both single and dual color prints.

Figure 2.16 summarizes the performance of our approach. Timings for processing include all steps (azimuth, path planning, AO). Timings are measured on an Intel I7 4770, 3.4 GHz equipped with a GeForce GTX 770. We process multiple slices in parallel (8 threads). Note that the relative overhead in filament length becomes smaller on larger objects or with denser infills (here we use only 20% infill).

The Weight of Plastic The weight of plastic depends of the shape of the support but also of the surface that require supports. To make a fair comparison of the weight of plastic, we need to apply the methods that generate the supports on the same surfaces. If the said surface are not the same for all algorithms, one might out performed the others if it detect less surface to support.

The Print Time Comparing the print time is tricky. We need to compare it for the same surface to support and sliced by the same software. However it is not always possible since the support generation is often embedded with the slicing process.

Some algorithm integrate the user in the loop for the generation of support and we have to compare them to fully automatic method.

Multiple color prints

We first test two challenging models. Dragon-heart has a significant imbalance between both extruders, implying that one is idle for long periods of time. The body is larger than the extruder spacing in all directions. The dragon is printed at 0.2 mm layer height. Twocolor-world combines fine, detailed features with a circumference which is larger than the extruder spacing. We print it in black and natural plastic at 0.3 mm layer height. The later being translucent, any color smears end up being visible. Nevertheless, we reach high print quality with crisp color separation as shown Figure 2.19. This is to be compared with ReplicatorG/Skeinforge as shown in Figure 2.18.

Figure 2.13 compares dragon-heart printed with ReplicatorG/Skeinforge and our technique, both using our azimuth angle optimization.

Figure 2.17 shows the Robot-ice model printed in opaque red within a crust of translucent natural white ABS, at 0.3 mm layer height. As shown by the back-lit model our approach produces a clean output within the volume itself.

Figure 2.15 compares the result of progressively enabling each component of our technique (none, rampart only, full) versus the result of Makerware 2.4. The model fits within the extruder spacing, so all defects are due to Case 1. For this comparison we match the settings of Makerware and use 150 mm/s for the travel speed, 40 mm/s for the perimeters and 90 mm/s for all other paths. Layer height is 0.3 mm. The print time for our full technique is 46 min versus 24 min without, using respectively 4.6 and 2.3 meters of filament. The overhead goes down on larger prints (see Figure 2.16). Makerware 2.4 prints in 39 min using 3.91 meters of filament. Some differences with Makerware are explained by the different approaches used for slicing, in particular regarding the thin petals ; however color smears are clearly visible in all but our result.

Limitations and future work

The rampart wastes a small amount of plastic -to be compared with the cost of failed or low-quality prints. Plastic is also easily recycled in filament (see for instance the Filabot). Printing the rampart may involve crossing over the print, risking color smears. This is visible at close inspection on the right side of the Robot-ice, Figure 2.17.

While we strongly minimize the amount of defects, some color smears may still be visible when one extruder prints for a long time and, due to the object geometry, misses the wipe. Vertical complexity also increases the rampart-surface distance which reduces its efficiency. A direction of future work is to further optimize the shape of the rampart to perform more wipes. Our ordering step could be improved to take print time into account. Our edge cost could also easily incorporate additional terms, for instance hiding zippers in high curvatures of the surface.

Later improvement to the implementation

Since the publication of the work, we decided that the computation time was too high for its integration in the IceSL software developed within the team. In single color print, it does not require that much optimization to obtain good results based on the geometry of the model. We decided to not use the information based on computation of the ambient occlusion and to simplify the path planning in order to decrease both print and computation time.

Instead of exploiting ambient occlusion information to determine the starting point of each perimeter paths, we now rely on the curvature of the paths. Points on high curvature regions are favoured as starting points, with a higher priority given to the ones in concave regions (low visibility area). This hides zippers well for paths with salient angles -as before the zippers are not really hidden, but their visual impact on the surface of the model is reduced.

The rampart motivated future work by colleagues. Hornus et al. [START_REF] Hornus | Tight printable enclosures for additive manufacturing[END_REF] developed a technique that generates ramparts that are printable, and as close as possible to the object.

Other contribution to the printing process

This section describes my contribution to other projects linked to the printing process. In particular, it presents an algorithm that detects points that need supports, and a guideline to compare slicers. The first part is part of a collaboration with Jérémie Dumas and Sylvain Lefebvre. It has been published in Transaction of Graphics, special issue of SIGGRAPH 2014 [START_REF] Dumas | Bridging the gap : Automated steady scaffoldings for 3d printing[END_REF].

Detection of support points

Before computing the geometry of the support structure, we need to determine a set of points that require support (See Figure 2.21). Our approach starts by slicing the model without any support, determining the full set of print paths. Each print path is a sequence of segments along which plastic has to be deposited. The print paths are of two types : the perimeters which follow the outer boundary of the surface and the infills which fill the interior of the volume.

Our algorithm walks along each print path and checks whether each segment endpoint is properly supported by the layer just below. The test considers the coverage of a disk having for diameter the size of the print nozzle (0.4mm in our setup). If more than 50% of the disk lies outside the object on the layer below, we consider the endpoint unsupported -this threshold was determined experimentally to ensure good surface quality. In practice, we implement the test using images of the layers with 0.05mm pixel resolution. The algorithm 1 describes this step. An simple example of how the algorithm works is given Figure 2.22. We only check segment end points since the segments themselves form bridges if their extremities are supported. However, in order to ensure a good quality for bottom surfaces, we restrict the longest segment length. This is done by re-sampling any segment whose length exceeds a threshold (5mm in our implementation). This simple analysis does not take into account the fact that when a point is supported, a whole length of filament around it can be considered supported as well -the cooling filament having a non negligible rigidity. This is the case on perimeters. This effect turns into a surface support when filaments are deposited side by side, for instance when filling an area with a tight infill pattern (see [START_REF] Chalasani | Support generation for fused deposition modeling[END_REF] for a nomenclature of such cases). We therefore select only a subset of the detected points. Pseudo code is given by Algorithm 1. C(u, v)

Comparing slicers

Whenever we improve the quality of a surface or when we generate support structures for 3D printing, we need a way to compare our new techniques with previous work. The different techniques are not always available as publication or the code has not been published, making it hard to reproduce.

In the case of the technique for multi material printing, we wanted to compare the visual quality of an object printed with our method with others, which was straightforward : it required pictures of the prints under different viewpoints. We also compared the computation time, and the amount of wasted material for auxiliary structures. The key difficulty was to match the parameters as best as possible despite the different slicing algorithms.

Our algorithm that generates supports structures was more difficult to compare with previous work. First of all, our algorithm is integrated into the slicing process, and the print paths are used to compute the set of support points. In contrast, previous support techniques use the angle with the geometry or image based computations to compute the area that need support (see section 1.2.1.3 of the state of the art). Therefore, we could not easily ensure that two different support structure generation algorithms would be given the exact same set of points as input.

To compare our results with MeshMixer [START_REF] Schmidt | Branching support structures for 3d printing[END_REF], we adjusted two parameters in Mesh-Mixer : the angle threshold and the density of point to support to match as closely as possible our support density. The Makerbot desktop support generator is integrated to the slicing software, and the slicing algorithm is not the same as ours. In order to compare the print times, we needed to carefully select the slicing parameters such that first print times would match without support, and only then would we slice with the support structures.

In general, comparing support structures is very difficult as their performance heavily depends on the choice of subsequent slicing algorithm and, of course, on the geometry to be supported itself. Ultimately, it could be interesting to let the user choose between different algorithms or interactively edit the initial produced support (which, for instance, MeshMixer and Simplify3D allow).

Conclusion

Our work makes it easier to get satisfactory results with multi-material prints. By carefully analysing the defects and the behavior of the extruders we proposed a technique removing or hiding most issues. Our algorithm finds a better azimuth angle for printing and uses a specialized path planner exploiting a disposable rampart in close proximity of the shape to protect the printed part and refill the extruders with plastic. Our approach also improves the quality of single color prints by hiding zippers in regions of low visibility. This is a side effect of our edge cost definition, which seeks to enter perimeters in hidden locations.

Some printers are equipped with one extruder with multiple filament for example the Cyclope 11 form E3D. Our method has to be adapted to this case. The refill is still important because the change of material is not immediate : it takes time to flush the previous material from the nozzle. Our refill strategy can be used to absorb this transition time. Zippers still appear and still have to be hidden. However, oozing will appear less because in this case the extruder idles only during travel which might be short enough to consider only retractation. However in this case retractation might lead to an other defects, because both filament are pressurized in the extruder and might be mixed during retractation.

The input of our algorithms is a complete specification of a 3D shape. If it needs external support, they are computed on software side, but it does not simplify the design process. It's limited to a particular technology. If we consider only what can be done software side there isn't so much thing that can be done. If we consider the hardware improvement, this work might become less relevant, in particular if the 3D printing technologies evolve to fast. As I explained in previous section, we can also look for methods that are closer to the user and help her to design the shape. There are two ways to do so, either the algorithm can handle some parts of the design process by completing incomplete specification or by guiding the user in the exploration of the design space. The next chapter shows a method that does the first.

Introduction

It is hard to define a 3D model entirely. It can be done using a modelling software that requires extensive training to master, such as Blender or 3DSMax, or by writing parametric models through Computer Aided Design (CAD) modellers such as IceSL or OpenSCAD. Taking into account fabrication constraints makes it even harder in particular if the user is not familiar with those constraints. Moreover she needs to iterate between the fabrication and the design, which is time consuming.

Thus, it seems natural to simplify the design process itself by developing algorithms that help the user to design shapes, or by optimizing shapes to make them fabricable. As we saw in the previous work, the design can be optimized to enforce the fabrication constraints. This chapter presents two contributions inspired by this methodology.

The set of constraints to deal with and the design process heavily depend on the application domain. Thus, to explore this approach I identified cases where it is particularly interesting. The first case I considered is the aided design of mechanisms, and the second case I considered is for aided design of assemblies from planar cutouts. In both cases, the user needs an extensive knowledge of the fabrication constraints before starting to design. Both cases will be detailed later in this chapter, and they both result in formulation of difficult combinatorial problems, such as a constraint satisfaction problem and a Bin Packing problem, which are both known to be NP-hard.

In the first section I will describe a technique that assists the modeling of mechanisms. It takes into account the fabrication constraints and use a simplified version of the design -given by the user -to produce the final model. The final mechanism is meant to be fabricated pre-assembled (i.e. it is functional immediately after fabrication). This technique is not limited to a particular manufacturing technology, but we demonstrate its efficiency on low-cost filament printers. This work has been done with my advisor and has been published in Computer Graphics Forum, special issue of Eurographics 2015 [START_REF] Hergel | 3d fabrication of 2d mechanisms[END_REF].

The second section tackles the problem of reducing wastage when modeling planar cut assemblies. As discussed in the previous work, these designs are made of several parts cut out from a same master board. The material in between the cutouts is wasted. Given a parametric model of such a design, we minimize the amount of material wastage by optimizing both the packing and the parameters of the design. We presented our results with actual furniture cut with a CNC machine and smaller models cut with a laser cutter. This work has been accepted with major revision at Transactions on Visualization and Computer Graphics. It has been done in collaboration with Bongjin Koo, Niloy Mitra and Sylvain Lefebvre.

3D Fabrication of 2D Mechanism

Designing mechanisms is a difficult task therefore significant research is dedicated to automated their generation or to simplify their design. Yet popular sandbox games allows gamers to design mechanisms, either through a simple interface (Physical Sandbox, Algodoo) or as an element of gameplay (Minecraft). Algodoo is a sandbox game in witch the user can design and simulate 2D mechanisms. The simple interface and graphics of the game make it appealing and fun. This game not only simplify the design process, but also make it enjoyable.

In this section, I seek to fabricate mechanisms with low-end 3D printer, that were design with those kind of interface. While modelling mechanisms for fabrication is an hard task, we developed a method that supports part of the modelling for the user. Given underspecified mechanisms (i.e. 2D scheme) we compute a 3D printable shape that makes the same motion.

Contributions

-We solve for the 3D layout of the mechanism by exploiting inclusions whenever possible. -We define the 3D shapes of the final parts by constructive solid geometry (CSG), considering the positions of the parts throughout the mechanical simulation. -We automatically synthesize a chassis for the mechanism using topology optimization. Our approach takes into account the forces generated by the mechanism on the chassis during the entire simulation. Our approach makes no assumption regarding the shape of the mechanical parts : gears, cranks and cams are not tagged in the input. They function properly through the preservation of the set of contacts and interactions from the 2D mechanism into the fabricated mechanism.

Limitations Our algorithm does not detect unrealistic mechanisms (i.e. mechanisms that may generate excessive stresses, that may exhibit singularities, or mechanisms where parts can fall or detach). Some over-constrained 2D designs cannot be resolved by layering or inclusion (Section 3.1.2.6).

Overview

The input to our algorithm is a set of N parts P = {P i |i = 0..N -1}, each described by a 2D polygon. The polygon of a part may have holes, but has to form a single component. The parts may be connected through hinges and fixed joints. We denote the set of joints : H = {(P i , P j )|P i , P j are connected by a hinge or a fixed joint} Our approach involves three steps : layout (Section 3.1.2), geometry synthesis (Sec- The layout step determines the relative positions of parts and assigns them with a depth interval. We denote I(P i ) = [l i , h i ] the interval assigned to part P i , with l i ≤ h i two integers. The inclusions between parts are determined by orienting edges in a graph capturing contact and collision constraints. The geometry synthesis step determines the exact 3D geometry of each part, using the layout and the motions resulting from the simulated mechanism. The last step synthesizes a chassis for the mechanism : a geometry for the main body holding everything together.

Mechanical layout

Our approach produces mechanisms favoring inclusion between parts. This is used in particular to resolve cases where the parts overlap in the 2D specification without interacting. The main advantage of this approach is to reduce mechanical jitter : the hinge axles are much stronger when supported on both their extremities. Inclusion alone cannot work on all mechanisms due to additional geometric constraints and interactions between parts. For these cases our approach resorts to layering, but only locally.

The layout process starts by analyzing the simulated mechanism, tracking overlaps and interactions between parts (Section 3.1.2.1). This information provides us with a set of observations that are used to make hypotheses regarding which parts can include which others (Section 3.1.2.3). Our algorithm greedily add inclusions, until contradictions are detected (such as having both A ⊃ B and B ⊃ A). These contradictions are transformed into layering rules. The final optimization assigns depth values to the intervals by solving a constrained satisfaction problem (Section 3.1.2.4).

Analysis

Our approach starts by simulating the mechanism to construct the set of observations. It keeps track of overlaps -parts that overlap without colliding -and interactions -parts that are allowed to be in contact during the simulation. This is done by simulating the input 2D mechanism using the Box2D library.

We assume mechanisms to have a periodic motion, and run the simulation until a prior configuration is encountered, or a user selected maximum time is reached. The result is a set of T time frames. We denote by M t i the position matrix of part P i at time t ∈ [0, T [, and denote by M t i P i the polygon of part P i at time t. We record all overlaps between parts in a set : O = {(P i , P j )|∃ t such that P i , P j overlap at time t} We keep track of all interactions between parts during simulation. We denote the set of interacting parts as : C = {(P i , P j )|∃ t such that P i , P j are in contact at time t} Note that for any two parts P i , P j we have (P i , P j ) ∈ O ⇒ (P i , P j ) / ∈ C and (P i , P j ) ∈ C ⇒ (P i , P j ) / ∈ O. We also have H ⊂ O since all parts sharing a joint also overlap. From these sets we define the mechanism graph as G = (P, H ∪ O ∪ C). The set of edges is the union of the joint set H, the overlap set and the contact set. Each edge in the graph is tagged to track which set it belongs to (edges in both H and O are tagged as belonging to H).

Additional observations are made about the mechanism. The first are erasing cases. A part P j is said to erase a part P i if the temporal sweep of its polygon covers P i entirely and they are not connected by a joint. More formally :

P j erases P i if P i \ ∪ t∈[0,T [ ((M t i ) -1 M t j P j ) = ∅ and (P i , P j ) / ∈ H
In such cases, the part P i cannot include the part P j as it would have to be split in two independent parts to fit P j within its depth. If P i , P j are connected by a joint, then P i remains connected through the axle and is not erased by P j . The second are detachment cases. A part P j is said to detach P i , P k (k = j) if the temporal sweep of P j overlaps with the joint between P i , P k . Note that the overlap test is considering the diameter of the joint axle (5 mm in practice). If P j detaches P i , P k then we request that P j includes both P i and P k to avoid having P j cross the axle between P i , P k .

These cases are illustrated Figure 3.4.

Mechanical configurations

The mechanisms we generate can produce three types of mechanical configurations between two parts A and B. Each results in a rule regarding their intervals :

1. A includes B (denoted by A ⊃ B) In this case we request A to include B and C so that their axle is not cut by A. Note that these constraints will be combined and may conflict, in which case layering will be locally performed. These configurations are depicted in Figure 3.5. They are mutually exclusive : if A is layered with B they cannot interact as they share no interval in depth. If A is layered with B, then B cannot be included within A (and vice-versa) as they also share no interval. If A includes B, then the volume of B is carved out from A (see Figure 3.5 top-left) and therefore they cannot interact.

⇒ I(A) ⊃ I(B)
Whenever possible our algorithm favors inclusion over the other two configurations.

Generating inclusions

The goal of this step of the algorithm is to generate as many inclusion configurations as possible. To this end, we exploit the observations made during analysis and greedily attempt to include parts into one another. Whenever inclusion cannot be used we fallback to layering. At this stage we only determine relationships between the parts intervals (e.g. I(A) ⊃ I(B)). The exact values of the depth intervals will be computed at the next stage (Section 3.1.2.4).

Inclusion relationships are determined by orienting the H and O edges of the mechanism graph G (Section 3.1.2.1). An edge (P i → P j ) implies that I(P i ) ⊃ I(P j ). The goal is to find an acyclic orientation : an inclusion cycle would produce an unsolvable case of circular inclusion, e.g. I(P i ) ⊃ I(P j ) ⊃ I(P i ). When orienting the edges we take care not to contradict the interaction rules (recall that A includes B is incompatible with A interacts with B, see Section 3.1.2.2). This is done by verifying that no inclusion path is formed between two parts A and B if they interact in the input mechanism.

The orientation of some of the edges is constrained by the erasing and detachment cases :

P j erases P i ⇒ I(P j ) ⊃ I(P i ) P j detaches (P i , P k ) ⇒ I(P j ) ⊃ I(P i ) and I(P j ) ⊃ I(P k )

As a result of these constraints, contradictions may appear during the orientation process, where both I(P i ) ⊃ I(P j ) and I(P i ) ⊂ I(P j ) are required. Such cases are resolved by switching to a layering configuration for P i and P j .

We orient the edges of G considering edges in H first and then edges in O. In each subset, we start by the edges with a constraint. This order is important : we prefer to avoid layering on joints (set H) since this is the case where fragile axles are generated. We therefore orient the edges in H first, so that contradictions are more likely to appear on the edges of O which are later considered.

For each edge in sequence, we first determine which orientations are possible. This involves checking for an existing constraint, verifying whether an orientation violates any interaction rule, and then checking whether an orientation would produce an inclusion cycle. If two orientations are possible we use a heuristic to select the orientation of lowest cost (see below). If no orientation is possible, we have encountered a contradiction.

Contradictions. We deal with contradictions by removing the problematic edge from the graph and by adding a layering configuration rule between the parts : I(P i )∩I(P j ) = ∅. This forces P i and P j to be in different depth intervals instead of being included into one another. However, this introduces an additional requirement on the graph orientation : the parts P i and P j should not have any common descendant in the oriented graph. Let us assume such a descendant P k exists. We would have I(P i ) ⊃ I(P k ) and I(P j ) ⊃ I(P k ) which gives (I(P i )∩I(P j )) ⊃ I(P k ). This directly contradicts I(P i )∩I(P j ) = ∅. To account for this, every time a contradiction is detected we add the additional constraint that P i , P j should not have a common descendant. The set of descendants is easily maintained during the graph orientation algorithm, and we reject any edge orientation that would violate such a requirement. When checking for common descendants we also follow interaction edges (edges in C) to prevent the layered parts to include parts that have to interact, i.e. P u ⊂ P i , P v ⊂ P j where P v , P u interact : this would result in a similar contradiction.

Resolving a contradiction by layering removes all detachment constraints between P i , P j : as both parts will be placed in non-intersecting depth intervals, they can no longer cross their respective axles.

Since the set of constraints is updated, and because some earlier choices may violate the new constraints, we restart the graph orientation every time a contradiction is resolved. When the process restarts edges are traversed the same order, skipping the edges removed due to contradictions.

Chassis. The chassis appears as a part in the graph. To guarantee that it includes all other parts, we orient the chassis edges prior to considering any other edge in the graph.

Figure 3.2 illustrates a case where the chassis is involved in a detachment constraint. In such cases, we request the detaching primitive to be the most included. That is, P j detaches (P i , C) implies I(P j ) ⊂ I(P i ) and I(P j ) ⊂ I(C), where C is the chassis. The axle between C and P i will exist around P j -even though P j cuts it, it will exist in two parts attaching C and P i on both sides. E.g. in Figure 3.2 the main wheel axle is cut by the inner arms. Nevertheless the wheel is properly connected on both sides to the chassis, and remains a single part through the axle with the arm. This is possible as long as P j does not erase P i , in which case layering would automatically be used between P j and P i . Indeed a contradiction would then appear when orienting the edge (P i , P j ).

Orientation cost heuristic. Whenever we can freely choose the orientation of an edge, we apply the following cost heuristic. In absence of constraints our goal is to avoid thickening the parts too much. In other words, we want to keep the size of the depth intervals |I(P i )| small. The intervals are optimized at the next step (Section 3.1.2.4) and therefore we do not know their exact size during graph orientation. However, we can easily determine a lower bound. Consider a path in the oriented graph from part P i to part P k : P i → ... → P k and denote L the length of this path. Since we have P i ⊃ ... ⊃ P k , it follows that |I(P i )| ≥ L. We therefore seek to minimize the length of the longest path from every node. When orienting an edge (P i , P j ) we select the orientation minimizing L(G o , P i ) + L(G o , P j ) where L(G o , P ) computes the longest path from P to any other node in the oriented graph G o (the graph with only the previously oriented edges, and the edge being tested).

Depth intervals

The previous step produces a number of rules relating the depth intervals of the parts. The goal of this section is to compute the depth values assigned to the lower and upper bounds of each interval I(P i ) = [l i , h i ]. We assign integer depth values to the intervals, which are later mapped to physical thicknesses in the final object (see Section 3.1.3). Intervals where l i = h i correspond to parts having the minimal thickness (2 mm in practice).

After the analysis we obtain three types of interval rules : inclusion (e.g. I(P i ) ⊃ I(P j )), layering (e.g. I(P i ) ∩ I(P j ) = ∅) and interactions.

Inclusion. Inclusions are captured by the oriented edges in G. They result in the following inequalities :

I(P i ) ⊃ I(P j ) ⇒ l i < l j and h i > h j
Note the use of strict inequalities, which guarantees that the including part (P i ) has one layer on each side of the included part (P j ). This ensures that axles are supported on both sides.

Layering. Layering rules are produced when resolving contradictions on edge orientations. We distinguish layering due to the removal of an overlapping edge (∈ O) from the layering due to the removal of a hinge edge (∈ H).

On overlapping edges :

P i layered by overlap with P j ⇒ l i > h j + 1 or l j > h i + 1

These inequalities guarantee that P i , P j will have a spacing of at least one between them, ensuring an including parent piece will support their axles on both sides. On hinge edges :

P i layered by hinge with P j ⇒ l i = h j + 1 or l j = h i + 1
This constrains both parts to appear next to each others through depth, ensuring that the axle between them is as short as possible.

Interactions. These rules are necessary to enforce that contacts exploited by the mechanisms (gears, racks) are properly captured by the 3D model. They result in the following equalities :

(P i , P j ) ∈ C ⇒ l i = l j or l i = h j or h i = l j or h i = h j
This ensures that the parts will properly interact through their top or bottom layers. This rule is more restrictive than it could be, since in principle the parts interact as long as they share an interval where no included part exists (see Section 3.1.2.2). However, we found it sufficient in practice while reducing the combinatorial complexity for the CSP solver.

Solver

We directly translate these rules into an integer constraint problem that we solve using Minion [START_REF] Gent | Minion : A fast, scalable, constraint solver[END_REF]. We restrict the space of integer to [0, 2 • N ], with N the number of parts.

Minion returns the solution minimizing the sum of part thicknesses, that is N i=0 |I(P i )|. As Minion performs an exhaustive search within the solution space, we configure it to return the best solution found after at most 90 seconds.

Once the intervals are determined for each part, we are ready to generate the final geometry of the 3D parts.

Discussion, failure cases

At worst our algorithm eliminates all edges between the parts in the graph and includes everything in the chassis. The parts will then be layered within the chassis, which becomes a crankshaft hosting the layered mechanism.

However, this does not guarantee success as some mechanisms cannot be layered. Such a case is shown Figure 3.6. The only solution involves modifying the shape of the fixed joint between the two bars. This is not considered by our system nor, to the best of our knowledge, by any of the existing techniques. In such cases, the CSP solving for the intervals will admit no solution.

Part geometry synthesis

This step of the process takes as input the set of parts P i , i = 0...N and their corresponding depth intervals I(P i ) = [l i , h i ]. The output is the 3D geometry of each part. In order to produce the 3D geometry we take into account the following :

-Parts have to be carved to allow for passage of other, included parts.

-Parts that come in contact have to be modified to take a spacing tolerance into account (0.4 mm in practice). -Parts that slide along others without being attached to the chassis have to be maintained at their selected depth. -The geometry of hinge joints has to be produced, enabling the mechanism to print pre-assembled. The base shape of a part is formed by the linear extrusion along the z axis (depth) of its 2D shape. We denote by B i the base volume of part P i . The position of the part in depth is computed such that pieces allotted in consecutive layers are separated by a small space. For an interval [l i , h i ], the extrusion takes places between z l i = (t + s)l i and z h i = (t+s)(h i +1)-s where t is the minimal thickness (2 mm) and s the spacing tolerance between consecutive parts (0.4 mm).

The final shape S i is obtained from B i by subtracting from the initial volume the time sweep of the pieces included in P i , as well as the time sweep of the pieces in contact with P i . All subtracted pieces are dilated by the contact tolerance spacing. The volume S i is precisely defined as :

S i = B i \ ∪ j∈N (i) ∪ t∈[0,T [ ((M t i ) -1 M t j B j ) ⊕ B z 0.4
where N (i) = {j|(P i , P j ) ∈ O ∪ C}, ⊕ is the dilation operator and B z 0.4 is a cylinder of axis z, of height and diameter 0.4 mm. We compute the shape by a combination of 2D operations using the Clipper library [START_REF] Johnson | Clipper -an open source freeware library for clipping and offsetting lines and polygons[END_REF], and a few 3D CSG operations.

Free assemblies. The mechanism might include parts, or sub-assemblies of parts that are not connected to the background by any hinge : they are only sliding along other parts. We call these free assemblies. They are detected as disconnected components in the graph with only H edges.

Free assemblies require special care : in 3D nothing prevents them from falling out of their assigned depth interval -recall however that we assume that they are properly locked inside the 2D mechanism. We address this issue by creating fins (protrusions) along the sliding parts, see Figure 3.7. These fins are added to the base shapes B i of the parts, and are thus subtracted from the other parts that are in contact (with a spacing tolerance). They physically constrain the parts to remain aligned in depth.

This approach in currently limited to the case of free assemblies sliding against non-free assemblies : we do not support several free assemblies sliding against each others. The part in pink slides along the L-shaped part. Our approach generates fins around the sliding part so that it is locked in depth inside surrounding parts. Middle : Printed result, note how the gear is also carved by the fin. Right : Interlocking shape of the axles allowing for pre-assembled printing on filament based printers.

Hinges. The geometry of the hinges is designed to allow for pre-assembled printing (see Figure 3.7, right). We add the hinges by CSG, carving the parts to let the axles through. If the part is too narrow the axle geometry will introduce a local bulge to ensure the axle fits properly -in some cases this can prevent the mechanism to function, e.g. if a surface along which two parts interact is modified. We do not currently address this issue.

After this stage the mechanism is almost ready to print, but still lacks a chassis.

Chassis synthesis

When designing mechanisms in 2D the user attaches primitives to the background 'wall'. When creating the 3D counterpart of the mechanism we have to synthesize a chassis acting as the background. We produce a 2D geometry that is used to sandwich the 3D mechanism in between two walls, as illustrated Figure 3.2. Alternatively the chassis could be extruded to the full mechanism depth and carved like any other part, see Section 3.1.3. This is unnecessary unless the chassis is a crankshaft, so to reduce material use and print time we prefer the sandwiching approach in practice.

The trade-offs in synthesizing the chassis are that we want it to be strong enough to support the efforts generated by the mechanism, but at the same time we would like to keep it small to reduce material use, print time and for aesthetics reasons (a thick chassis would hide the mechanism entirely). This problem is elegantly answered by topology optimization techniques [START_REF] Bendsøe | Optimal shape design as a material distribution problem[END_REF].

Background on topology optimization

We cast chassis synthesis as a case of 2D topology optimization for minimizing the compliance energy. The optimization domain is a grid of square elastic elements where each element i, j takes a density ρ i,j ∈ [ρ min , 1]. We denote by ρ the vector of all element densities. Given a choice of densities and a set of fixed elements where the structure is anchored, the finite element method can be used to compute the planar deformation due to a set of forces f = f 1 , ..., f n located at the grid nodes (element corners). The displacement vector for all grid nodes u is obtained by solving K(ρ) • u = f where K(ρ) is the global stiffness matrix assembled from the elements. The stiffness matrix of an element ρ i,j is given by ρ 3 i,j K e where K e is the 8 × 8 stiffness matrix of a square element in the target material.

The compliance energy is defined as E(ρ) = f •u. Minimizing the compliance maximizes the rigidity of the system under the given forces. This energy is minimized by gradient descent under the constraint that i,j ρ i,j = A, where A is the target area of the produced structure. Thanks to the cubic exponent in the per-element stiffness, the system tends to use only 0 or 1 for ρ i,j .

Chassis optimization

The chassis has to resist to the forces exerted by the mechanism at all times. We therefore record the forces at the joints attached to the background for the entire simulation. This gives us a set of T force configurations, where T is the number of time frames. We optimize the chassis by maximizing the compliance over all time frames, that is E(ρ) = t∈T f t • u t where K(ρ)u t = f t . This is made efficient by pre-factoring the stiffness matrix K and then solving for u t for all time frames.

We select a resolution of 2 mm per pixel, a Poisson ratio of 0.35 and an elastic modulus of 2.3 GPa (ABS plastic material). The target area A is set to 10% and then reduced until the structure is disconnected. We select the last value generating a fully connected structure. The final outline of the shape is extracted by smoothing out the result with a box filter of size 3 × 3 and then contouring the isovalue 0.25. The process is summarized Figure 3.8.

Results

We modeled all our results using Algodoo, with the only constraint that the mechanisms have to function properly in 2D and be in a valid position (interacting parts such as gears should not overlap). By default the models are rescaled so that their bounding box fits a 150 × 150 mm square.

All the 3D mechanisms are generated automatically from the scenes created in Algodoo, without any user intervention.

Figure 3.10 shows a number of printed results. From top-left to bottom right : the Gear Puppet model is made of six gears with custom shapes. The small brown box indicates the base for the chassis. The EG flag model is a case of sliding part. The model has automatically generated fins along the sliding part that are carved from both the Lshaped part and the gear. This model broke during clean up and we used screws to repair it (see also Section 3.1.5.1). The Scissor model is a case where no chassis is needed. It is actuated by a hidden mechanism which is ignored by our system after simulation. This shows how our algorithm alternates inclusions as a result of the edge orientation cost heuristic. The Wheel model illustrates how part geometry is automatically created to allow for passage of included objects. The green box at the bottom of the design indicates the base of the chassis. The Gear Train model is case of cyclic interaction between gears, creating a layering between the two central gears. The Three Leg model is a case that results automatically in a crankshaft. It is also shown Figure 3.3.

The complexity of our printed results is limited by the capability of our printers. We show in Figure 3.11 and Figure 3.12 outputs of our algorithm on more complex designs. Our system is capable of keeping the overall design thickness small, while exploiting inclusions wherever possible.

Performance. Most results are computed in a few seconds. For instance, for the small model Figure 3.1 graph orientation takes 154 ms, Minion returns the CSP solution in 7 ms. For the larger model Figure 3.12 graph orientation takes 489 ms, Minion returns the CSP solution after 90 seconds as it explores for the best possible solution until the timeout. Running for longer does not return a better solution, but Minion has to finish exploring the space to guarantee the optimal is found. Chassis optimization takes 2.34 seconds.

3D printing

We print all our objects on inexpensive filament printers in ABS and PLA plastic : a Replicator 1 from Makerbot, and Ultimakers 1 and 2 from Ultimaker.

All objects are printed in one piece, using support. We experimented both with dissoluble plastic and a weak filling pattern for support. We had better results using a weak infill pattern. See Figure 3.9 for an example of a print before and after cleanup.

Our mechanisms exploit the fact that 3D printers can produce pre-assembled articulated objects, so that we do not have to consider the assembly stage. However, this is not necessarily the best option of filament printers. In particular after printing some force has to be exerted to free the mechanism from inaccessible support. One issue we encountered is breaking of the plastic axles when applying force. The EG flag design, for instance, broke when we freed the sliding part and we had to use screws to reassemble it manually. An interesting direction of future work is to split the mechanism into pieces that are easy to assemble [START_REF] Luo | Chopper : Partitioning models into 3D-printable parts[END_REF][START_REF] Vanek | Packmerger : A 3d print volume optimizer[END_REF].

Conclusion

We show that we can create a shape, here a mechanism, from partial specifications. The initial input is not fabricable, and we computed a 3D printable shape from it. We wanted to minimize the heights of the mechanisms under the constraints (collisions and contacts) that were discovered during the simulation. The algorithm knows the shape different parts and computes the relative positions of the parts of the mechanisms.

The lack of the user in the loop that generates the final shape can be seen as a limitation. The mechanism does respect the fabrication constraints, but the result might . This model contains two crankshafts for steering the arms and legs. These were created by layering constraints (red bold edges in the graph). Inclusions are used in most places. Note the lightweight synthesized chassis. One of the large wheel is doubled to avoid the bottom bar of the neighboring crankshaft which overlaps during motion (edge between n15 and n16 in the graph).

be unexpected. Even if the shape respects the initial design and its simulation, the relative positions of the different parts are important for the global aesthetics of the mechanism. Using user intents to guide the system would be important. It would lead to a different system and methodology though, as this would be more 'modelling with the user' than 'modelling from user specifications'.

Towards zero-waste furniture design

There are softwares that allow to design parametric models for fabrication (IceSL, OpenSCAD...). We can find such parametric models on specialized websites like "Thingiverse". A parametric model defines a function that generates a shape from a set of parameters to a design space. The parameters of the function are tuned by the user such that the shape is good looking, and fits a function. In some cases, the exact values of the parameters are not important to the user, however they impact the fabrication process. In this case, there is an opportunity to optimize the parameters automatically.

In this work, we introduce the problem of waste-minimizing planar cutout designs, and investigate it in the context of flatpack furniture design using laser cut wooden parts. Specifically, we study the interplay between design exploration and cost-effective material usage. . The final user design can directly be exported for laser cutting and be assembled (c). In this case, wastage was reduced from 22% to 11%.

Design Workflow

Our goal is to propose design variations that minimize material wastage without violating original design intent. In this section, we present the proposed system as experienced by the user, and describe the main algorithmic details in the subsequent sections. Here we particularly focus on how the user encodes her design intent.

The user starts by choosing the desired material (i.e., thickness of wooden planks) and the number and dimensions of the master board(s). Our system considers rectangular master boards -in practice these can represent new boards or left over rectangular spaces in already used boards. The user starts by loading an initial part-based 3D object design, either created in a modelling system or as a parametric model. The parts can be rectangular or have curves boundaries. The user specifies also a range for all the variables that can be modified by the system.

The algorithm suggests multiple design variations that all satisfy the design specifications but achieve different material usages. We measure material usage based on the fraction of the master board(s) utilized. Once satisfied with a design, she requests for the cutting patterns. She can investigate the design, the material space usage and the cutting patterns, and send the patterns directly for laser cutting.

Figure 3.14 -Evolution of shape variation across a run of our algorithm on the coffeetable (top) and low-chair (bottom) models.

Overview

Our goal is to analyze aspects arising from material considerations, and investigate how design changes affect such considerations. Specifically, we ask how to adapt a furniture design so that it makes better utilization of material in the resultant design layout. Note that this is the inverse of the design rationalization problem, i.e., instead of taking a design as fixed and best fabricating it, we adapt the design so that the resultant rationalization makes better utilization of available material.

Parameterized designs

The design is considered as a function D(X) that produces the geometry of a fixed number of parts, given a configuration vector X. The parts can be assembled into a final furniture design.

We make no assumption as to how D is implemented -we demonstrate in Section 3.2.4 parametric designs modelled by CSG. We however expect a continuous behavior from D(X), i.e., small changes in X result in small changes in the part shapes. Parametric modellers generally offer such continuity to smoothly navigate the space shape.

During wastage optimization our algorithm will change the value of X so as to explore whether changes in part shapes reduce wastage. Since we focus on laser cut furniture construction, we assume the parts to have the same thickness τ . The parts are thus represented as planar polygonal contours extruded orthogonally.

The geometry of a part p i lies within a bounding box which we represent by a six dimensional vector encoding the box center p i and the lengths of its three sides l x i , l y i , τthe Z axis being aligned with part thickness by convention.

Material space

Since we focus on laser cut furniture, any 3D design given by a configuration vector X is realized as a layout (i.e., cutting plan) in the material space. Material space is

S 1 S 2 M 1 M 2 M 3 M 4 M 5 M 6 M 7
Figure 3.15 -Our algorithm discovers design variations in shape space. The user starts from a design M 1 , and the algorithm seeks for wastage minimizing variations by interleaving between topologically different material layouts (indicated by changes in curved paths) or continuous changes to the layouts (indicated by same colored curves). For example, paths (M i , M j ) denote continuous design changes, while points M i denotes designs where new layouts are explored (i.e., branch points).

characterized by the largest master board that the machine can possibly cut, a rectangle of size W × H. In this space, each part i is associated with a position (u i , v i ) and an orientation o i ∈ {0, π/2, π, -π/2}. We use w i , h i as extent of a part bounding box in the material space along the x-and y-axis, respectively. The part box lengths in material space are given by the two plank dimensions other than thickness. For a plank i, of orientation o i , we get one of the two cases :

o i = 0, o i = π ⇒ w i = l x i h i = l y i o i = -π/2, o i = π/2 ⇒ w i = l y i h i = l x i
The material space positions and orientations are variables in the layout optimization algorithm, alongside the design parameters X (see Section 3.2.3).

When wastage is not a concern and a design easily fits within material space, the variables (u i , v i , o i ) are independent of the design, i.e., they simply adapt to changes in part sizes. However, as we seek to maximize utilization of the material space, the material space variables become tightly coupled with the design parameters. Our layout optimizer therefore jointly optimizes for material space variables and design parameters to minimize wastage (see Section 3.2.3)

We next discuss what makes a desirable layout from the point of view of furniture fabrication.

bad layout mediocre layout good layout A good layout is characterized by less area of material wasted (shown in green).

Properties of a good design layout

Rectangular master boards can be sourced in a large choice of sizes and thicknesses from resellers. Therefore, our goal is to achieve a full utilization of rectangular spaces, so that the user can use boards of exactly the right size and minimize wastage. The machine dimensions determine the maximum extent of a single board.

We measure wastage as the fraction of the space not utilized by the design in its material space bounding rectangle. Ideally, we want to achieve full utilization, i.e., null wastage.

An ideal packing is one that tightly packs all the parts to perfectly fill up one or more rectangular master boards (like a puzzle). Our system helps the user achieve this by automatically exploring changes improving material space usage (see Figure 3.16).

Design Layout Optimization

The wastage of a layout depends essentially on two factors. The first factor is the quality of the packing that can be achieved, given a fixed set of design parts. The second factor is the set of parts itself, which can be changed through the design parameters X.

In our approach we pack the parts using a deterministic docking algorithm that always produces the same result for a same ordering of the design parts. Therefore, a first optimization variable is the order in which the parts are sent to the docking algorithm. The second optimization variable is the vector of design parameters X. These two variables have different natures : finding an ordering is a combinatorial problem while the design parameters can be continuously explored.

Bitmaps During optimization we regularly call the parametrized design function D(X) to obtain a new set of parts after changing parameters. The layout optimization represents parts internally as bitmaps : each part contour is rasterized at a resolution τ , typically 0.5 mm per pixel. This enables fast manipulation of the parts within the layout. Each part thus becomes a bitmap having either 1 (inside) or 0 (outside) in each pixel. The size of the bitmap matches the part extents in material space w i and h i . Every time the design is refreshed a new set of bitmaps is computed for the parts. The master board is similarly discretized into a regular grid of resolution τ .

Design optimization for wastage minimization

The design optimization improves the design parameters X to minimize wastage in the layout, keeping the docking ordering fixed. It appears as the subroutine ImproveDesign in Algorithm 2. The pseudo-code for this step is given in Algorithm 3. Our objective is to suggest design changes that reduce wastage, progressively improving the initial layout. The algorithm performs a guided local search by changing the parts -through the design parameters -to reduce wastage.

Prior to considering which parts to modify, we have to answer two questions : First, how to drive the design parameters X to change only a given part (Section 3.2.3.1). This is achieved by relying on the gradients of the part size with respect to X. Second, we have to decide on how to evolve the layout when parts are changed (Section 26). We rely on a sliding algorithm that avoids jumps in the layout configuration, thus producing only small changes in the wastage function when small changes are applied to the part sizes.

Overall strategy Our approach changes the size of parts iteratively with two different steps in each iteration : grow (line 5) and shrink (line 6). These steps progressively modify the design and keep track of the design of smallest wastage encountered so far.

The grow step attempts to enlarge the parts so as to reduce wastage. Each part is considered and its size is increased for as long as the growth further reduces wastage. When no further improvement can be obtained, we create further opportunities by shrinking a set of parts. However, randomly shrinking parts would be inefficient, as most parts would grow back immediately to their original sizes. Other parts are tightly coupled to many others in the design D, and shrinking these would impact the entire design. Therefore, we analyze the layout to determine which parts have a higher probability to result in wastage reduction.

Changing part sizes During design space exploration the algorithm attempts to vary the part sizes w i and h i individually. These dimensions vary as a function of design parameters X. In the remainder we use s(X) to designate the vector of all part sizes assembled such that s 2i = w i and s 2i+1 = h i .

Let us denote λ the change of size desired on s i . Our objective is to compute a design change ∆ such that s i (X + ∆) = s i (X) + λ. We denote the vector of changes as Λ = s(X + ∆) -s(X). In this process only the size s i should change with others remain unchanged whenever possible, that is Λ s j ,j =i = 0 and Λ s i = λ.

Parts are not independent in the design and therefore there is no trivial link between X and s i (X). We therefore analyze the relationship through the gradients ∂s i (X) ∂x j . These are computed by local finite differencing (depending on the design analytical expressions may be available). Each non-null gradient indicates that parameter x j influences s i . Multiple parameters may influence s i and parameters typically also influence other variables : there exists k = i such that ∂s k (X) ∂x j = 0. To compute ∆ we formulate the following problem. Let us consider the components of ∆ = (δ 0 , ..., δ |X|-1 ). The change in part sizes due to ∆ can be approximated in the first order through the gradients as Λ = i δ i • ∂s(X) ∂x i . We solve for ∆ such that Λ s i = λ and Λ s j ,j =i = 0.

If there are less parameters than part sizes, the problem is over-constrained and solved in the least-square sense, minimizing ||Λ -(0, ..., λ, ..., 0)|| 2 . If there are more parameters than part sizes, the problem is under-constrained and solved in the least-norm sense, minimizing ||∆||. We rely on a QR decomposition of the system matrix to solve for both cases, accounting for possible rank deficiencies due to overlapping parameters in X.

We implement this process as a subroutine ChangePartSize(X,s i ,λ), with X the current design parameters, s i the part size to change and λ the change to apply. It returns the new design parameters X + ∆. A second subroutine ChangePartSizes(X,Λ) allows to change the size of multiple parts at once.

Updating layouts by sliding

As the shapes and sizes of the parts change the layout has to be updated. One option would be to restart the docking process after each change. However, for a small change the docking process can produce large discontinuities in the wastage function. This makes a local search difficult. Instead, we propose to rely on a sliding operation that attempts to continuously update the position of the parts after each change. Note that performing such an update while optimizing for a given objective (i.e. wastage) is a very challenging combinatorial problem, as each part can move in four directions (left/right/top/bottom) and multiple cascading overlaps have to be resolved. We propose a heuristic approach that works well for small changes in the part shapes.

The algorithm is based on the following principle. After changing the part shapes, we reintroduce them in an empty layout in order of docking. However, each time a part is reintroduced it may now have empty space to its left/bottom or it may overlap with previously placed parts. Both cases can be resolved by a single horizontal or vertical move. However a single move is generally not desirable as empty space may remain along the other direction. We therefore perform a limited sequence of horizontal/vertical moves. At each iteration we select between vertical or horizontal by favoring moves that result in the smallest layout bounding box. In case of a tie, we favor moves to the left/bottom versus displacements to the top/right. This is illustrated in Figure 3.17.

The pseudo-code is given in Algorithm 4. In the algorithm we denote by L the layout and denote by L pos p i the layout obtained when adding part p i at position pos in the master board grid of L. A(.) measures the area, box(L) is the bounding rectangle of the layout. The algorithm iterates over all parts in docking order (line 2). It then performs a fixed number of sliding operations on each part (line 3) -we use N = 4 in our implementation. Lines 4-7 compute a horizontal move, favoring moves to the left that collapse newly created empty spaces. Lines 4-7 similarly compute a vertical move. Lines 16-24 decide whether to select a horizontal move pos x or vertical move pos y .

The process may fail if parts can no longer fit in the masterboard. This can happen either because there is not enough remaining area, or because sliding cascades in large moves that prevent further insertion of parts. In such cases we return an empty layout which by convention has a wastage of 1 (worst possible), line 13.

Grow step

The grow step is described in Algorithm 5. The algorithm iterates over all parts in random order (line 4) and progressively increases the size of a part in a loop (line 7). Note that the first iteration of the loop determines the starting wastage for growing this part (lines 5 and 12-13). The process continues until the growth results in an increased wastage (line 15).

After each change of parameters the design parts are recomputed (line 9, D(X e )) and sliding is called to adapt the current layout to the change. The result is checked. If wastage decreases the process continues (line 13). If not, we first attempt to dock the parts again (line 11). This can help continue the growth in cases were sliding fails to resolve overlaps by continuous changes. If wastage still not improves we stop the growth of this part size (line 15).

Shrink step

The goal of the shrink step is to create further opportunities for design changes when no parts can further grow. The typical situation is that a subset of parts are forming locking chains between respectively the left/right and top/bottom borders. The parts belonging to these chains prevent any further growth. We therefore detect locking chains and select the parts to shrink among these. This often results in a change of aspect ratio of the masterboard, and new opportunities for other parts to grow.

The overall approach is described in Algorithm 6. It first determines which parts to shrink by calling SelectPartsToShrink and then computes a change of parameters using the approach described in Section 3.2.3.1.

The core component is the SelectPartSizesToShrink subroutine, described in Algorithm 7. The selection starts by gathering all contacts between parts in the layoutthis is done efficiently in the discretized layout grid. We first draw the part images into the grid and then check pairs of neighbors belonging to different parts. This produces the set of left/right and bottom/left contacts between part sizes (the involved part size is deduced from the part orientation and the considered axis). The contacts are oriented from right to left (respectively top to bottom). We similarly detect which parts touch the borders. The contact detection is implemented in the GatherContactsAlongAxis subroutine.

Once the contacts are obtained we start from the right (respectively top) border and form locking chains. Starting from the border, we produce the set of chains iteratively. Each chain c is a sequence (lef t, s f irst , ..., s last ). At each iteration the chain spawns new chains for each contact pair (s last , s next ) obtained by augmenting c as (lef t, s f irst , ... , s last , s next ). Potential cycles are easily detected as repetition of a same part in the chain and are ignored. The locking chain computation is implemented in the FormContact-Chains subroutine.

We next randomly select part sizes to shrink until all locking chains are removed. The selection probability of each part is designed to avoid too large a jump in the design space. To achieve this we consider two factors. First, we compute the number of occurrences of each part in the locking chains, occ(p i ). A part with many occurrences is a good candidate as shrinking it will resolve multiple locking chains at once. Second, we seek to avoid shrinking part sizes that are tightly coupled with others in the design D. We compute the dependence of a part size by counting the number of non-zero entries in the Λ vector computed internally by ChangePartSize(X e ,s i ,-1).

We select part sizes with the following random process. First, we select a number of occurrences o with probability P (o) = p i ,occ(pi)=o occ(o)

p i occ(p i )
. Then, among the parts such that occ(p i ) = o we select a part size s i with probability P (s i |occ(s i ) = o) = 1 -dep(s i ) p i ,occ(p i )=o dep(p i ) . This process is implemented by the DrawPartSizeWithProbability subroutine.

After each part size selection we update the set of locking chain by removing all chains where the part size appears.

Exploring orderings

The subroutine ExploreOrderings in Algorithm 2 performs a stochastic search of orderings resulting in low wastage layouts. The process starts from a random order and iteratively considers possible improvements by swapping two parts. At each iteration, we perform a swap and recompute a layout using the docking algorithm. If wastage is reduced the swap is accepted, otherwise it is rejected. We apply the process for a number of iterations and keep the best ordering found as the starting point. We use |D(X)| 2 iterations, where |D(X)| is the number of parts. For each ordering, we use a fast docking algorithm to compute a layout with low wastage. within the concavity will never be possible. This is illustrated in Figure 3.20, left.

We therefore propose a second criterion that discourages these bad choices. The idea is to estimate the space that will be definitely enclosed when a part is added to the current layout. This is done efficiently by considering the enclosed space between the height-field of the current layout and the height-field of the added part, along both horizontal and vertical directions.

Let H r (L) (respectively H t ) be the right (respectively top) height-field of layout L and A(H r (L)) the area below it. The enclosed area is then defined as :

E(L i-1 , p i , pos) = s∈{r,t} max (0, A(H s (L i-1 pos p i )) -A(H s (L i-1 )) -A(p i ))
with A(p i ) the area of part p i . Note the max that clamps negative values : this is due to cases where the part nests in a concavity below the height-field of the other direction.

The enclosed space is used as a tie-breaker when docking positions produce the same wastage values ; therefore D(L i-1 , p i , pos) returns the vector (W (L i-1 pos p i ), E(L i-1 , p i , pos)). The effect of the enclosed area criterion is shown in Figure 3.20.

Results

We used our system for various design explorations. As the complexity of the designs grows beyond 4-6 planks, the utility of the system quickly becomes apparent. Note that the design constraints (see Figure 3.21), by coupling different object parts, make the optimization challenging by preventing independent adaptation of part sizes. By off-loading material usage considerations to the system, the user can focus on the design. Note that even when changes to the design are visually subtle, material utilization often increases significantly. Design examples We used our system to design and fabricate a range of examples comprising rectangular and/or curved parts. We fabricated fullscale and miniature models of designed furniture. Models were made from MDF of 3 mm thickness and MDF of 30 mm thickness. The designs are easy to manufacture in batches since after design layout optimization they typically fit master boards completely : there is no need to attempt to reuse leftover pieces of wood, and switching boards requires little clean up. We directly output the cutting plan for the laser cutter (or CNC machine) from the design layout, adding connectors for planks sharing an edge, if needed. These are conveniently detected since planks exactly overlap on edges in the 3D design. The connectors are either finger joints, which are both strong after gluing and easy to assemble ; cross connectors for interleaved planks, or dowel-jointed for thicker materials (20 mm and 30 mm thickness). 3.1 gives an overview of the complexity of each model, and the gains obtained by the layout optimizer. The system performs at interactive rates on a laptop taking from a few seconds to 3-4 minutes for the larger examples. Note that speed depends on how many exploration threads are pursued. nearly 90% material usage, although one can achieve null wastage by deciding to pick a rectangular top -a decision that can be made after layout optimization as this opportunity is revealed. An allowable range was specified for the height and the bases were marked as symmetric as input design constraints. In the case of the parrot-shelf (Figure 3.19a), the user indicated minimum and maximum range for the horizontal shelves along with desired range for the shelf heights. As described, parameteric designs are easily supported and optimized for in our framework. Figures 3.19b Figure 3.22a shows a L-shaped work table. The user specified a target height for the design and a maximum work volume. Note that the legs of the table were also constrained to not change more than 25% of original dimensions to prevent unwanted design changes. Figure 3.22b shows a coupled shelf and table design where height of shelves and tabletop were similarly constrained. Figure 3.22c shows a stylized chair, where both the chair seat height and chair width were constrained not to change beyond a margin. Figure 3.22d shows multiple designs covering 2 master boards. The second master board is used as an overflow when docking can no longer fit a part in the first. The layouts are slid independently.

Comparison We now evaluate the relative importance of the key algorithm steps. Figure 3.24a shows the importance of the docking criteria introduced in Section 3.2.3.2. We ran 500 random runs of our proposed packing algorithm with ('ours') and without ('baseline') the docking criteria on the coffee-table example. We sort the runs based on resultant usage (no shape optimization is performed here) and plot the two conditions. The docking criteria consistently resulted in 10-15% better usage.

Figure 3.24b shows usage improvement over one exploration run on the coffee-table sequence. The legend explains which step (grow, shrink, etc.) is being performed. While this is the result from a single thread, many similar threads are simultaneously explored. The few best results are then presented to the user as suggestions.

Figure 3.24c-d compare the importance of analyzing the material space layout to decide which plank to change and how. As baseline, we selected planks at random and perform either a grow or shrink sequence with equal probability. Note that our method consistently outperforms the alternative approach.

Limitations Currently, the algorithm can only make topological changes only for parameteric models. This will be an interesting future direction to pursue for constrained models. Our docking approach cannot nest parts into holes of other parts, a more advanced algorithm would be required. A more material-induced restriction arises when the starting layout does not leave much space to optimize over. This effectively means that the degree of freedom for the design is low. Adding more planks does reduce this problem (by providing additional freedom). However, beyond 25-30 planks, the exploration of the shape space becomes slow as there are too many paths to explore. One option is to limit exploration to only a subset of planks at a time, but then again, very desirable design configurations may be missed.

Conclusions and Future Work

We investigated how design constraints and material usage can be linked together towards form finding. Our system dynamically discovers and adapts to constraints arising due to current material usage, and computationally generates design variations to reduce material wastage. By dynamically analyzing 2D material space layouts, we determine which and how to modify object parts, while using design constraints to determine how the proposed changes can be realized. This interplay results in a tight coupling between 3D design and 2D material usage and reveals information that usually remains largely invisible to the designers, and hence difficult to account for. We used our system to generate a variety of shapes and demonstrated wastage reduction by 10% to 15%.

Interestingly, a first attempt was done with topology optimization, using the SIMP method to optimize planks. However, topology optimization is hard to tune for an inexperienced user. In this early attempt, the user needed to specify the rectangular planks that were optimized by the system. Topology optimization generated shape that are not simple to cut (see Figure 3.25), which is an additional problem. In this case, the shapes of the planks are constrained to be homeomorphic to a cube. Currently, we do not consider the stability of the produced furniture nor the durability of the joints. This could be integrated as dynamic constraints following previous work on structural reinforcement and shape balancing. Another important future direction is to generalize the framework to handle other types of laser cut materials, e.g., plastic plates that can be easily cut and more interestingly bend to have freeform shapes. Note that the packing problem will still be in 2D for such developable pieces. This can help produce interesting freeform shapes, while still making efficient use of materials.

Conclusion

Interestingly, during the work on waste minimization, we developed an interface to design simple furniture with rectangular planks. Once a complete UI was obtained, we confronted it to art school students (See figure 3.26). This has been an interesting experience : they had clear ideas about what they could do with this interface and they were particularly enthusiasts about the material optimization. However, the design tool was not easy to use for them, as it was too unusual in its interactions. They also lacked several features to further refine the designs. We thus decided to not further investigate the UI aspects and refocus on the optimization. This is however a very interesting direction of future work, but that requires a close collaboration with designers from the start.

The two methods that I presented in this chapter require at least some partial specification of the shape. It means that the user has to have a clear idea about what the shape looks like. However, this cannot always been expected. Therefore, I developed a synthesis system that automatically synthesize from functional specifications, in the context of furniture design. This system is described in the next chapter.

Synthesizing from Functional Specification Introduction

The previous chapter details methods to optimize shapes -assemblies from planar cutouts and mechanisms -with respect to the fabrication process. In the case of assemblies from planar cutouts, our technique optimizes a parametric model to reduce the amount of wasted material.

In this chapter, we explore the synthesis of furniture from functional specifications ; where the function is to support a set of loads arbitrarily positioned in space. Instead of defining the shape partially, the user only defines the function of the shape, and the system fully synthesizes it -we are at the end of the spectrum of techniques I considered.

The optimization system presented in the chapter 3.2.5 required a parametric model of the design that the user wanted to fabricate. In contrast, the technique presented here operates similarly to topology optimization (see Section 1.4.1.3 of the state of the art), in the sense that it fully synthesizes a final shape that can support the specified loads. In this chapter, the shape is a shelf. It is more specialized than furniture ; however shelves are everywhere. They can be easily manufactured at home with a saw and wooden planks. At the same time, besides the trivial cases, they are not simple to imagine and design. Modelling them to fit a particular environment, items to store and windows to avoid, while minimizing waste and work to fabricate them is a difficult task. Our system does exactly this. The shelves that are produced can have intricate, interesting layouts and move beyond simple parallel shelves.

As all methods presented in Chapter 3, we formulate a combinatorial problem. It requires only a set of loads placed in space by the user, and it synthesizes a fabricable furniture that supports all the loads and is guaranteed to stand stably. Interestingly, this bares similarities to the problem of generating support structures in 3D printing [START_REF] Dumas | Bridging the gap : Automated steady scaffoldings for 3d printing[END_REF] and some of the issues we face here are similar. Indeed the structure has to be self supported and at static equilibrium with or without the loads. Again, this work has been inspired by the Do It Yourself trend and we develop a technique that does not require expensive material or advanced manufacturing technologies. This work has not been published yet. It is done in collaboration with Niloy Mitra and Sylvain Lefebvre.

Overview

The idea is the following : Knowing the position of user specified items in space, we want to synthesize a furniture that is at static equilibrium, is supporting all the items placed by the user, can be further edited, and uses an as small as possible amount of wood. In addition, avoidance constraints can be specified to provide clearance for e.g. a window or door. The next section presents the user interaction. It also presents how the system maintains the topology of the furniture while the user is interacting to edit it. This is achieved by formulating a least norm problem on the design variables.

Then I explain how the synthesis is done, and in particular the snapping operation at its core. The snapping operation ensures that the static equilibrium is maintained. The synthesis algorithm has been tailored to use a small amount of planks.

User Interaction

In this section I describe the interaction allowed by the system. The user is able to place objects represented by their bounding boxes in space, to move and deform these bounding boxes (see Figure 4.3). The user also defines the size of the master boards he will cut. As opposed to previous chapter, the master boards are planks, that will be cut in only one direction(see Figure 4.3).

User Interface

3D View The 3D view shows the user input as well as the furniture that has been synthesized by the system. In the 3D view, the user is able to select a plank and to move it or to change its size (see Figure 4.2). Once the furniture has been synthesized, she can move the boxes and preserve the same topology, or ask the system to synthesize the furniture again to obtain a variation of the current model. It can also leads to a topology change, since the user edit the input of the algorithm. The user is able to types of boxes : the first one represents the objects that she want to support, the second one are avoidance zones, that the synthesizer has to avoid. Material Space We considered that the material space is composed by long wood planks that will be cut by the user. Indeed, those not require any special material to cut, The system shows the material space to the user.

Preserving topology during user edition

After synthesis, we could let the user edit individual planks. However, doing these changes without assistance would be difficult as changes would disconnect planks or result in self intersections. Instead, our algorithm helps the user maintain connectivity with a constraints based system described below. Throughout an edition session, the user is thus able to modify the furniture that has been synthesized, by smoothly deforming planks. The design globally adapts to these changes.

Notations A shelf S is represented by a set of planks P and a set of constraints C. A plank P i is represented by its orientation o i ∈ {Horizontal, V ertical}, its width direction d i ∈ {X, Y }, its length l i (thickness and width are fixed), and the position of their center in space p i . We note U (S) the vector constituted by the position and the length of all planks in S.

Once the synthesis is done, the user is also able to deform the furniture, and the system maintains the topology. In order to maintain the feasibility during the user interaction, linear constraints are automatically defined during the synthesis of the furniture. Those constraints are under the form :

N i=0 A i * p i .x + B i * p i .y + C i * p i .z + D i * l i = K
Where A i ,D i ,C i ,D i and K are constants defined during the synthesis and N = Card(P). The user is able to smoothly edit the furniture one variable at a time (See Figure 4.2). We build the system by using all the constraints defined during the synthesis and a constraint based on the last user edition. If the user modifies the variable p i .x by δ, the constraints p i .x = p 0 i .x + δ where p 0 i is the previous value of p i is added to the system. Usually, the number of constraints (equations) in the system is greater than the number of variables. The said system is under determined and has an infinite number of solutions. However, to avoid non-intuitive moves in the solution, we minimize the distance between the furniture before the user interaction, and the furniture after the user interaction. This means that we want to minimize the following equation where M (C) is the matrix defined by the constraints in C : ||U (S) -U (S 0 )||

Synthesis

As we saw in the previous section, the synthesizer does not not only synthesize the furniture but it also generates a set of constraints to maintain the feasibility of the shelf while the user is interacting. This section describe the snapping operation and the constraints that are produced by it, as well as the overall synthesis algorithm.

Synthesis algorithm

First, the system adds a plank below each item specified by the user. The orientation depends of the size of the item along X and Y axis. The idea is to snap all horizontal planks together. If they have the same altitude, we snap them by their edges or add vertical planks to snap an above plank to a plank below, again this can length the horizontal planks. During this process several possibilities are considered, scored and the best is kept at each iteration. Vertical planks have to touch the ground or to have their bottom part on an horizontal plank. An overview of the algorithm is presented in Algorithm 15.

Algorithm 10: Synthesis

Input: A set of boxes D Output: A shelf S 1 while S is not valid do

Generating Variations

The user can asks to the system to generate variation of the topology of the current shelf. It is done by adding randomness in the choice of the snapping operation, instead of taking the one of smallest cost. The system still chooses the snapping that are adding the less wood with higher probability.

Snapping operation

The algorithm is based on an operation called snapping, which snaps the edge of an horizontal plank to the edge of another horizontal plank, possibly introducing vertical planks to do so.

The snapping is tailored to ensure stability and to produce furnitures using few planks. It also generates the constraints that maintain the feasibility during the user manipulation. The snapping between an edge e an a plank p is possible under some precise conditions. The edge has to be higher than the plank (noting the edge e, this gives e.Z < p.z). It is only possible to snap planks that are aligned as seen from above, or that are perpendicular to one another.

The cost of the snapping operation is the quantity of wood added by growing the plank and adding the vertical plank. Avoiding collisions The snapping tries to avoid collisions by extending the planks along the edges if it is possible (see figure 4.7 and 4.7). If it is not possible the snapping operation is denied by the algorithm (it is given an infinite cost).

Constraints The snapping operation generates constraints on the planks depending on their relative orientations after snapping. The constraints are added to maintain the connectivity during user edition. The constrained are detailed in section 4.2.2

Adding Vertical Planks If an edge is snapped to a plank that is not at the same altitude, the system adds a vertical plank between this edge and the plank. The system adds constraints to maintain this snapping despite user edition. The system also tries to snap the edge of a plank to the ground, and compute the corresponding cost.

Results

We present a variety of results to show the efficiency of every part of our algorithm. Figure 4.9 and 4.10 shows the effect of the avoidance zone placed by the user. Using avoidance zone allows her to cope with room with more complex geometry (e.g. a room with a pillar in the middle, Figure 4.4).

Figure 4.9 -The user moves the avoidance zone (red box) and ask for the system to synthesize again. In both cases, the system carefully select the snapping operation to avoid this zone.

Conclusion

We presented a technique that synthesizes a furniture from functional specifications. A shelf is synthesized by using a set of objects placed in space by the user. The user is allowed to edit the shelf after synthesis, and the system maintains its feasibility with a constraint system automatically built during synthesis.

It is important to let the user edit the furniture to give her back the control over the shape that she wants to fabricate. Designing from scratch is hard to do for a novice, but our system provides and initial complete answer that the interaction system helps easily edit through simple drag and drop.

Limitations and Future Work

This work is limited to the synthesis of shelves but they are omnipresent, and often have to be adapted to fit difficult spaces and/or items. We did not consider the synthesis of other type of furniture (e.g. table, chair...). We do not study the aesthetics impact that the synthesized furniture might have -however having the user in the loop helps him guide the system towards a desirable result.

The previous chapter of this thesis describes a technique that automatically explores possible designs to optimize the material space. We can imagine a similar technique based on the linear constraint system that would optimize the shelves for material wastage. The current system does not allow the user to change the topology of the furniture (only the synthesizer can do it). This would be an interesting feature to add.

Throughout this thesis I considered the problem of modeling objects for fabrication in different ways, by proposing algorithm that increasingly help the user with the design. My goal was to show that those modeling problems can be approached with different methodologies depending on the the profile of the user who wants to model the object, an what her intent and technical skills are.

The first part was tailored to optimize only the fabrication process. It is helpful for users who are able and are willing to use complex modeling tools, and who want to fabricate their models as close as possible to their virtual counterparts.

If the evolution of rapid manufacturing technology is as fast as the evolution of computers (e.g. by following some kind of Moore's law [START_REF] Moore | Readings in computer architecture[END_REF]), the price of today's state-of-the-art technologies will drop and this will make them accessible. Therefore the work based on a particular technology might become less relevant. However, helping the user to design will remain interesting, and considering fabrication and functional constraints will always be part of the process : the geometry, material and fabrication parameters of an object are all tightly coupled to its final intended use.

Modeling is a very difficult task for most casual users who are not trained to use a specific software. In this case I believe that the system has to support some part of the design process. In a sense, letting the system handle the fabrication constraints is a way to prune the design space. This pruning not only helps the user to explore the design space more efficiency, but it allows her to design only shape that are fabricable.

Following this trend, I considered how to let the algorithm handle various aspects of the design, up to the fully automated synthesis technique that is developed in the last chapter.

Future Work. There are some future works that might be interesting to explore. For example, instead of optimizing a parametric model of furniture to minimize the material wastage, we can imagine an interface that guides the user to the same objective during the modeling process. It would achieve the same purpose that the optimization method discussed in Section 2.2 (reducing wastage), but it would give the user a more direct control over the final shape. Also, we can imagine sketch-based modeling tools that take into account the physical and fabrication constraints as priors to help with the reconstruction of a 3D model from the sketch. These future works are both user oriented and serve the same purpose : Using fabrication constraints as a guide to modeling.

I believe that synthesis cannot replace an artist with her style, her feelings and her way to design, and the results that are shown in the last section are in no way pieces of art. They, however, can help in the first stages of the design process, or can help a user produce a furniture that function as intended, when aesthetics are a secondary concern. I also believe that designers will always be confronted to the reality of fabrication and will always benefit from tools that help them handle the constraints that they are facing.

Synthèse de formes fabricables à partir de spécifications partielles

Résumé long en français

Le développement des Fablabs et des Makerspaces montre que les techniques de fabrication rapide deviennent de plus en plus populaires. Une grande majorité de ces lieux est équipée d'imprimante 3D à fil fondu et de découpe laser, qui permettent de fabriquer des objets à faible coût. Leur popularisation à conduit au développement d'imprimantes de moins en moins chères et de plus en plus facile à utiliser.

Ces technologies de fabrication rapide, issues des techniques de prototypage rapide comme l'impression 3D permettent de fabriquer des pièces uniques sans demander d' expertise particulière du procédé mis en oeuvre. En revanche, la modélisation de nouveaux objets tout comme la personnalisation d'objets existants restent difficiles : en effet, les techniques de prototypage rapide imposent des contraintes sur la géométrie du modèle qui doivent être respectées (e.g. epaisseurs minimale, angles limites). De plus, l'explosion de ces technologies a modifié le profil de l'utilisateur qui manipulait les machines. Au départ, il s'agissait d'experts designers qui étaient formés pour manipuler ces technologies, aujourd'hui les machines sont utilisées par des amateurs enthousiastes, des enseignants, qui souvent ne sont pas formés pour utiliser ces machines. Cette évolution a créé un besoin de nouveaux outils logiciels utilisables par un plus grand nombre de personnes. Cette thèse présente un ensemble de techniques qui ont pour point commun d'assister l'utilisateur dans la modélisation d'un objet, en tenant compte des contraintes du procédé qui permettra de le fabriquer. À cette fin, l'algorithme prend en charge tout ou partie de la modélisation. Les problèmes présenté dans cette thèse sont d'ordre combinatoires et ont requis le développement d'approches heuristiques dédiées.

Dans le premier chapitre, je propose d'améliorer la qualité des objets fabriqués avec une imprimante 3D en minimisant certains défauts qui apparaissent lors de la fabrication. Je m'intéresse en particulier aux techniques de fabrication par fil fondu (FFF) qui sont les plus répandues. Le filament est poussé par un moteur pas à pas dans une tête d'impression qui est chauffée. La tête dépose la plastique couche après couche pour fabriquer un objet complet. Certaines imprimantes possèdent plusieurs têtes d'impression, ce qui permet de déposer des matériaux de natures différentes. En revanche, la qualité de l'impression souffre de la présence de plusieurs matériaux : du plastique fondu tombe par gravité des têtes d'impression qui ne sont pas en train d'imprimer, et vient se coller sur l'impression, laissant apparaître des défauts visibles sur l'objet. Ce problème est appelé oozing et le résoudre n'est pas simple : augmenter la vitesse certes réduit le problème, mais réduit aussi la qualité de surface. De plus, modifier l'imprimante pour ajouter un dispositif physique limitant les dépots parasites a un coût, et augmente le temps d'impression.

À la place, nous avons décidé de modifier les chemins d'impression en exploitant les degrés de liberté du procédé. Nous introduisons trois techniques pour améliorer significativement la qualité d'impression. Premièrement, en changeant l'orientation de la pièce sur le plateau d'impression pour minimiser l'impact du oozing. Ensuite, nous fabriquons un rempart autour de la pièce pour nettoyer les têtes d'impression. Dernièrement, nous introduisons une technique de planification de chemin pour éviter ou cacher au mieux les défauts qui apparaissent à cause du oozing. L'algorithme de planification est basé sur la recherche de zones peu visible du modèle grâce au calcul de l'occlusion ambiante. La partie finale de ce chapitre est dédié aux comparaisons de différents logiciels d'impression.

Dans le second chapitre, je propose d'aider l'utilisateur à prendre en compte les contraintes de fabrication pendant la modélisation. Mes techniques utilisent des informations partielles sur la forme que l'utilisateur souhaite fabriquer. J'ai appliqué cette méthodologie à deux problèmes distincts.

Le premier est la conception de mécanismes. En effet, comme le montre le succès des applications de simulation physique "bac à sable" (par exemple Algodoo, Phyzical Sandboxes, ou même MineCraft) qui permettent aux utilisateurs novices de modéliser des mécanismes simples, il existe un fort intérêt pour ce type d'objets. De plus, les mécanismes sont complexes à modéliser même pour des experts de part les nombreuses parties mobiles impliquées. Dans les applications facile d'utilisation, un ensemble de mécanismes sont modélisés en 2D en plaçant des roues dentées, des axes, et d'autres composants de bases a travers une interface intuitive. L'expérience de l'utilisateur reste agréable car il n'a pas à s'inquiéter des détails géométriques complexes nécessairent à la fabrication du vrai mécanisme. Dans ce chapitre, nous proposons donc de transformer un modèle de mécanisme 2D en mécanisme 3D qui peut être directement fabriqué (sans assemblage) sur des machines à dépôt de fils fondu. L'idée est de donner à l'utilisateur de ces logiciels la possibilité de fabriquer leurs modèles et de les voir fonctionner dans le monde réel.

Pour cela, nous résolvons plusieurs problèmes. Le mécanisme 2D d'entrée permet à certaines pièces de se chevaucher pendant la simulation. Ces pièces 2D qui se chevauchent doivent être transformées en pièces 3D qui ne se collisionnent pas dans le mécanisme fabriqué. La forme exacte du mécanisme 3D est déduite de la forme des pièces en 2D ainsi que de la simulation du mécanisme en 2D. Nous utilisons aussi de l'optimisation topologique pour synthétiser un châssis qui maintient le mécanisme fabriqué en une seule pièce, en prenant en compte les forces exercées sur les axes pendant la simulation. J'ai aussi appliqué cette méthodologie au design de meubles avec des modèles paramétrique. Ces modèles paramétriques sont faciles à trouver sur des sites spécialisés comme Thingiverse. Ils définissent des fonctions qui génèrent des formes à partir d'un ensemble de paramètres vers un espace de design. Ces paramètres sont choisis par l'utilisateur afin d'avoir une forme plaisante, qui remplie une fonction. Dans certains cas, les valeurs exactes des paramètres ne sont pas importantes pour l'utilisateur, mais le sont pour le procédé de fabrication ( ici, une découpe laser est utilisé pour découper les différentes parties du meuble qui sont assemblées plus tard ). En revanche, elles impactent le procédé de fabrication. Dans de telles situations, les paramètres peuvent être optimisés automatiquement. Dans ces travaux, nous introduisons le problème de « waste-minimizing-furniture-design » (modélisation minimisant le gâchis) dans le cas de meubles composé de pièce plates découpés au laser. En particulier, nous étudions le lien entre la modélisation et le gâchis de bois. En mixant les deux, nous donnons a l'utilisateur la capacité de prendre des décisions basé de modélisation basées sur le gâchis du bois.

Le lien établi entre le gâchis de bois et le modèle paramétrique est basé sur un algorithme qui explore l'espace de design en modifiant les paramètres du modèle de façon a optimiser l'espace matériel : une planche dans laquelle des différentes pièces du meuble sont placées pour gâcher le moins de bois possible. L'impact des paramètres sur la taille et la forme des pièces qui composent le meuble est pris en compte pendant l'optimisation pour modifier seulement les paramètres qui ont une influence sur l'espace matériel.

Enfin, dans certains cas (e.g. Grand public) l'utilisateur n'est pas forcément à même de modéliser ces formes via des logiciels spécialisés. Pour ce cas précis, je propose une technique de synthèse de meubles à partir de spécifications fonctionnelles, e.g. la spécification de poids à porter dans l'espace.

Le dernier chapitre de cette thèse porte sur une technique de synthèse de meuble inspiré des techniques d'optimisation topologique. Contrairement au technique présentée dans le second chapitre, l'utilisateur ne fournit pas d'information sur la forme de l'objet qu'il souhaite fabriquer, mais seulement sur sa fonction. Après avoir spécifié un ensemble de poids a porter dans l'espace, il laisse le système synthétiser le meuble qui permet de supporter tous ces objets. L'algorithme est inspiré des techniques de génération de support pour les techniques d'impression 3D. La synthèse génère aussi un ensemble de contraintes sur la forme du meuble, qui permet a l'utilisateur de l'éditer, pour minimiser l'utilisation de matière, sans s'inquiéter de la topologie de la forme finale. Cette technique simplifie la modélisation a l'extrême et ne prend pas en compte l'esthétique de l'objet synthétisé.

Français Les techniques de fabrication rapide, issues des techniques de prototypage rapide comme l'impression 3D ou la découpe laser permettent de fabriquer des pièces uniques sans demander d'expertise particulière du procédé mis en oeuvre. En revanche la modélisation de nouveaux objets tout comme la personnalisation d'objets existants restent difficiles : En effet, les techniques de prototypages rapides imposent des contraintes sur la géométrie du modèle qui doivent être respectées.

Cette thèse présente un ensemble de techniques qui ont pour point commun d'assister l'utilisateur dans la modélisation d'un objet, en tenant compte des contraintes du procédé qui permettra de le fabriquer. A cette fin, l'algorithme prend en charge tout ou partie de la modélisation.

En particulier, les problématiques suivantes sont abordées : Tout d'abord, je propose d'améliorer la qualité des objets fabriqués avec une imprimante 3D en minimisant certains défauts qui apparaissent lors de la fabrication. Les approches développées modifient uniquement les algorithmes de pilotage de l'imprimante.

En second lieu, je propose d'aider l'utilisateur à prendre en compte les contraintes de fabrication pendant la modélisation. Mes techniques utilisent des informations partielles sur la forme que l'utilisateur souhaite fabriquer, comme le dessin en deux dimensions d'un mécanisme, ou un modèle paramétrique qui définit un meuble. L'algorithme optimise une forme finale qui améliore des critères liés à sa fabrication (gaspillage, encombrement, etc.).

Enfin, dans certains cas (e.g. grand public) l'utilisateur n'est pas forcément à même de modéliser ces formes via des logiciels spécialisés. Pour ce cas précis, je propose une technique de synthèse de meubles à partir de spécifications fonctionnelles, e.g. la spécification de poids à porter dans l'espace.

English The Rapid Manufacturing techniques that emerged from Rapid Prototyping techniques such as 3D printing or laser cutting allow to fabricate unique objects. However, the design of those objects with existing CAD software remain a difficult task : rapid prototyping processes impose constraints on the geometry of the model. This thesis presents a set of techniques that assist the user in the design of an object by taking into account the constraints of the fabrication process. To achieve this, the algorithm automatically performs part of the modelling process.

The following problems have been tackled : First, I propose to improve the quality of 3D printed objects by minimizing defects that appear during the fabrication. The technique developed impacts only the algorithm that drives the printer.

Then, I propose to help the user to take into account the fabrication constraints during the modelling process. My techniques rely on partial information about the shape that the user wants to fabricate like the 2D sketch of a mechanism or a parametric model of a furniture. The algorithm optimizes the initial shape to improve fabrication objectives (Wastage, etc.)

Finally, in some cases, the user does not know how to operate dedicated software. In this case, I propose a synthesis technique of furniture from functionnal specification, e.g. loads that have to be supported in space.

1 . 1

 11 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Modelling and printing with Fused Filament Fabrication . . . . . . . . 1.2.1 Challenges of Fused Filament Fabrication . . . . . . . . . . . . 1.3 Planar cutting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 Modelling and fabrication with planar cutting . . . . . . . . . . 1.4 Shape Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 Approaches for shape synthesis . . . . . . . . . . . . . . . . . . 1.5 Shape Enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5.1 Assisted design of mechanisms . . . . . . . . . . . . . . . . . . . 1.5.2 Assisted design of furniture . . . . . . . . . . . . . . . . . . . . 1.6 Positioning of my contributions . . . . . . . . . . . . . . . . . . . . . . v

Figure 1 . 1 -

 11 Figure 1.1 -Left : a selective laser sintering machine works by depositing powder that is locally solidified by a laser. Image from Wikipedia (www.wikipedia.fr).Right : a Stereolithography apparatus machine works with a projector that is solidifying a liquid photo-sensible.

Figure 1 . 2 -Figure 1 . 3 -

 1213 Figure 1.2 -A chess game (thingiverse thing 1575432), a mechanical clock (thingiverse thing 328569), a music box (thingiverse thing 53235). All those model have been 3D printed

Figure 1 . 4 -

 14 Figure 1.4 -Fused Filament Fabrication

Figure 1 . 5 -

 15 Figure 1.5 -This figure shows the slicing process. The slicer computes the intersection between an XY plan and the model. From the intersection, the software computes all paths that will be followed by the extruder. Left : The Square ball model, Center :The intersection between a plan and the surface of the model, Right : The paths at the corresponding height

Figure 1 . 6 -

 16 Figure 1.6 -The different kinds of defects. The holes (center) and ooze (right) appears more likely in multi material print. Zippers (Left : appears even with single color prints.

Figure 1 . 7 -

 17 Figure 1.7 -The volumetric error (in red) depends of the gradient of the surface. The more horizontal it is, the bigger is the error. The zone shown in the figure presents the error in function of the gradient of the surface.

Figure 1 . 8 -

 18 Figure 1.8 -Bottom-Left : The leg of the puppy model. Top-Left :Without support structure the bottom part is not printed correctly. Top-Right : With support structure, the print is correct. Bottom-Right : After the removals of the support structure.

Figure 1 .

 1 Figure 1.10 -Left : a slice with perimeters (in red) and infill paths (in blue). The perimeters are cyclic and delimit zone. Right : the tree structure shows the topology of the different paths.

5 .Figure 1 . 11 -

 5111 Figure 1.11 -Bottom :The model of a round table. Top Left : The cutting plan to cut the different part of this table. Top Right : The leftover of material after the cut.

Figure 1 . 13 -

 113 Figure 1.13 -By following the rule of the previous grammar, we can obtain this derivation, terminal are shown in green and non-terminal in blue. The probability of each step is written on the line.

Figure 1 . 14 -

 114 Figure 1.14 -Topology Optimization in 2D. The user determined anchor on the left top and bottom corner, and a force on the right edge. The colour shows the material density (0 : blue 1 : red) From left to right : without penalization, without filtering, with both.

Figure 1 .

 1 Figure 1.15 -Different Intersection types presented in [25] Left : The green bar is intersecting the small gear. Right : the green bar is intersecting the hinge between the two gears.

Figure 2 .

 2 Figure 2.1 -A slice of the dragon heart model.

Figure 2 . 2 -

 22 Figure 2.2 -Case 1. blue extruder travels across the green region, depositing ooze.

Figure 2 . 3 -

 23 Figure 2.3 -Case 2. Blue extruder prints a segment, which makes the green one oozing over the blue region.

Figure 2 . 4 -

 24 Figure 2.4 -The left extruder uses black and the right extruder red. While the red (right) extruder prints the body of the dragon, some black (left) plastic will interfere with the red region. This is accurately predicted by the intersection volume (green). The printed model exhibits severe color smears and strings throughout this volume. Additional defects are due to poor path planning.

Figure 2 . 6 -

 26 Figure 2.6 -Left : One slice near the top of the 4-cones model. The red outlines are the walls of the rampart. Lime-green paths are travel moves. The bold paths within the rampart walls show were the extruders are active to refill with plastic. Right : Printed model, using our technique.

Figure 2 . 7 -

 27 Figure 2.7 -Left : The 4-cones model printing. The red arrow shows how much ooze exits the left (white) nozzle while the right (black) nozzle prints. Right : The rampart captured a significant amount of stringing. Result shown Figure 2.6.

Figure 2 . 8 -

 28 Figure 2.8 -The ambient occlusion computed on the kitten model. The algorithm uses darker area to hide defects where they are least visible.Thingiverse, thing 12694, user MBCook

Figure 2 . 10 -

 210 Figure 2.10 -Left : A slice showing print paths (A-D), infill paths (F0-F2) and zones (Z0-Z4). Each zone is a different region of the slice plane, with Z0 the outermost zone. Right : The inclusion tree captures inclusion relationships. Note how B, C, F0, F1 are children of the same zone Z1.

Figure 2 .

 2 Figure 2.11 -The graph nodes of a slice of the dragon-heart model, for a dual left/right extruder printer. The right (red) extruder is the reference. Green paths are navigation pathways, the orange paths circulate within the rampart. The bold colored paths are the location of the reference extruder while printing ; their color indicates which extruder is activated. Note the red/black dots corresponding to the start/end points of (open) infill paths.

Figure 2 .

 2 Figure 2.12 -The orange dashed lines are navigation paths added around the print and ghost paths. The ghosts are necessary to generate the navigation paths allowing extruder 0 to travel while extruder 1 avoids crossing the print.

Figure 2 . 13 -

 213 Figure 2.13 -Our result (right) has almost no defects compared to the same model printed with Skeinforge/ReplicatorG (left). Pictures focus on the worst regions of the surface. Both models use the optimized azimuth angle.

Figure 2 .

 2 Figure 2.14 -A black and white crystal and its rampart. Note the significant amount of stringing captured on the rampart. Small defects are due to thin color slabs not adhering.

Figure 2 . 15 -Figure 2 . 16 -

 215216 Figure 2.15 -Quality comparison. Top left : Print without our approach. Top right : Print with only the rampart (no navigation, no refill). Bottom left : Our final result. Bottom right : Print from Makerware 2.4. Rose by user Jillian (Thingiverse) Model Processing Print time Filament World 4m22s 2h20m [1h32m] 12.3 [8.3] Dragon 4m25s 1h51m [1h16m] 7.50 [4.3] Robot 8m40s 1h53m [1h06m] 9.91 [4.9] Figure 2.16 -Timings for processing, printing and length of plastic filament used (meters). Numbers in brackets are timings/lengths without using our technique.

Figure 2 .

 2 Figure 2.17 -Robot-ice printed with our technique. The backlit model reveals the absence of smears within the volume.

Figure 2 . 18 -

 218 Figure 2.18 -From left to right : Two-color-world model, printed with Replica-torG/Skeinforge, our technique without azimuth optimization and our complete technique.

Figure 2 . 19 -

 219 Figure 2.19 -Our result seen from different angles.

Figure 2 . 20 -

 220 Figure 2.20 -Left : Our result, zippers are hidden in low visibility regions. Right : Skeinforge with jitter plugin.

Figure 2 . 21 -

 221 Figure 2.21 -Cube floating in space. Left) Set of points requiring support. Middle) Generated scaffold. Right) Bottom surface quality.

Figure 2 . 22 -Algorithm 1 : 7 foreach u ∈ path do 8 if

 222178 Figure 2.22 -The decimation of supporting point on the cube. It starts by removing required point on the perimeters then decimate points on infill segment

Figure 3 . 1 -

 31 Figure 3.1 -Our algorithm takes as input a 2D design of a mechanism (a) and produces a 3D model (c) by computing a layout encouraging inclusion between parts, formulating the layout as a graph orientation problem (b). In the graph, edge orientation indicates inclusion relationships. The 3D model can be printed (c,d) and is functional. The chassis is automatically synthesized.

Figure 3 . 2 -

 32 Figure 3.2 -Possible solutions for the example of Figure 3.1. Left : Print out of our result using layering only. Middle : Out-of-plane motion resulting from using layering. Right : Print out of our result using inclusion. It produces less out-of-plane motions as axes are connected on both extremities.

Figure 3 . 3 -

 33 Figure 3.3 -Left : Input 2D mechanism. Middle : Graph used to construct the layout. Edge orientation indicates which part includes which other, while the red edges show which parts have to be layered. Right : Two views of the generated mechanism. The synthesized chassis appears in pink. The crankshaft configuration automatically results from the inclusion and layering constraints.

Figure 3 . 4 -

 34 Figure 3.4 -Left : The bar A sweeps across the (fixed) bar B, covering it entirely during the simulation. A is said to erase B. In this case, B cannot possibly include A within its depth or it would be disconnected in two independent parts. Right : During simulation, the bar A sweeps across the hinge between B and C. A is said to detach B andC. In this case we request A to include B and C so that their axle is not cut by A. Note that these constraints will be combined and may conflict, in which case layering will be locally performed.

2 .

 2 A interacts with B ⇒ (I(A)\ ∪ ∀P ⊂A I(P )) ∩ (I(B)\ ∪ ∀Q⊂B I(Q)) = ∅ 3. A layered with B ⇒ I(A) ∩ I(B) = ∅

Figure 3 . 5 -

 35 Figure 3.5 -Two parts in the three possible configurations, as seen from above. Inclusion (top-left), interaction (bottom left), layering (right). The configurations can be mixed, i.e. a part can include others that are in a layering configuration.

Figure 3 . 6 -

 36 Figure 3.6 -Left : Four bars seen from the top. Black segments indicate a fixed joint, while orange indicates a hinge joint. C,D can rotate around A,B but will cut the fixed axle between A,B. This system cannot be resolved by assigning different layers to A,B,C,D. Right : The only solution is to change the shape of the axle, making room for C,D.

Figure 3 . 7 -

 37 Figure 3.7 -Left :The part in pink slides along the L-shaped part. Our approach generates fins around the sliding part so that it is locked in depth inside surrounding parts. Middle : Printed result, note how the gear is also carved by the fin. Right : Interlocking shape of the axles allowing for pre-assembled printing on filament based printers.

Figure 3 . 8 -

 38 Figure 3.8 -Chassis synthesis by topology optimization. Left : four forces resulting from hinges at a given time frame (pink) and attachment point (gray). Middle : Optimized densities for these forces. Right : Final shape after smoothing and contour extraction.

Figure 3 . 9 -

 39 Figure 3.9 -Left : Model after printing, with weak infill support. Right : Cleaned model. The gears have rotated, note the small leftover from the infill pattern on top of the gears.

Figure 3 .

 3 Figure 3.10 -A variety of results automatically generated from the input 2D design. All these results are 3D printed on filament printers.

Figure 3 . 11 -

 311 Figure 3.11 -Eagle model. The mechanism shown in transparency (right) is generated from the design (top left). The mechanism graph (bottom left) shows inclusions and contact edges (bold blue). No contradictions were encountered : there is no layering. Note the double gears including the bars, as well as the space carved for the inner bars in the bars actioning the wings.

Figure 3 . 12 -

 312 Figure3.12 -Frogger model. The mechanism shown in transparency (top right) is generated from the design (top left). This model contains two crankshafts for steering the arms and legs. These were created by layering constraints (red bold edges in the graph). Inclusions are used in most places. Note the lightweight synthesized chassis. One of the large wheel is doubled to avoid the bottom bar of the neighboring crankshaft which overlaps during motion (edge between n15 and n16 in the graph).

Figure 3 . 13 -

 313 Figure 3.13 -We introduce waste-minimizing furniture design to dynamically analyze an input design (a) based on its 2D material usage (see inset) and design specifications to assist the user through (b) multiple design suggestions to reduce material wastage (see inset). The final user design can directly be exported for laser cutting and be assembled (c). In this case, wastage was reduced from 22% to 11%.

Figure 3 . 16 -

 316 Figure 3.16 -Examples of stages of layout refinement, from bad to mediocre to good. A good layout is characterized by less area of material wasted (shown in green).

Figure 3 . 17 -

 317 Figure 3.17 -Sliding a layout after a change of part sizes. Top : From left to right, initial layout, same after change revealing overlaps, layout after sliding. Bottom : Moves performed on the three first parts during sliding.

Figure 3 . 2 best ← ∅ ; 3 bestscore ← 1 ; 4 foreach 7 if score < bestscore then 8 best ← pos ; 9 bestscore ← score ; 10 LFigure 3 . 19 -

 3231478910319 Figure 3.18 -Height-fields of the layout used to position the next part. Left : Heightfield for dropping parts from the right (red curve). Right : Height-field for dropping parts from above (green curve). These height-fields are maintained every time a new part is added to the layout, and used for fast computation of the docking positions. Similar height-fields are pre-computed for the left/bottom of the parts.

Figure 3 . 20 -

 320 Figure3.20 -Two layouts obtained with the same docking order. Left : Without taking enclosed area into account the first part is placed with the concavity against the bottom packing border. This prevents the second part to nest within and cascades into a series of poor placements. Right : Taking into account enclosed areas results in a placement of the first part that allows nesting of the second part and produces a layout with lower wastage.

Figure 3 . 21 -

 321 Figure 3.21 -We show effects of designing with (middle column) or without (right column) the respective constraints activated.

Figures 3 .

 3 19 and 3.22 show various results. Table

Figures 3 .

 3 13 and 3.19 show results for objects with curved parts. Figure3.14 shows some intermediate shapes as the design evolves for the coffee-table (Figure3.13) and the low-chair (Figures 3.19-top) examples.

Figure 3 .

 3 [START_REF] Cignoni | Field-aligned mesh joinery[END_REF] shows alternate designs discovered by the algorithm for the Parrot shelf. While they have slightly lower usage they offer interesting variations that the user might prefer. Figures 3.13 was fabricated using a CNC machine. The optimized design achieved

Figure 3 . 22 -

 322 Figure 3.22 -Various material-driven design and fabrication examples.In each row, we show initial design (with material space layout inset), optimized design result (with material space layout inset), along with final cutout assembled model. Note that the design changes are often subtle, but still leads to significant improvement in material usage.

Figure 3 . 23 -

 323 Figure 3.23 -Two different design suggestions (green has ratio 0.86, blue has ratio 0.85) for the parrot-shelf. Original design with another design suggestion is shown in Figure 3.19.

  -d show three such examples. In each case, additional constraints were provided to keep the objects within a given volume. The parts of the objects are all tightly coupled making these challenging examples to optimize for.

Figure 3 . 24 -

 324 Figure 3.24 -Comparison of our algorithm against baseline alternatives. Higher is better. Please refer to the text for details.

Figure 3 . 25 -

 325 Figure 3.25 -Left : A furniture with three loaded horizontal planks. Center : The Finite Element Analysis on this shelf. Right : The results of the topology optimization.In this case, the shapes of the planks are constrained to be homeomorphic to a cube.

Figure 3 . 26 -

 326 Figure 3.26 -One drawing from the art school student.

Figure 4 . 1 -

 41 Figure 4.1 -Left : A Set of boxes in space placed by the user. Right : The synthesis is done by adding horizontal planks below each box and adding vertical planks to support the horizontal

Figure 4 . 2 -

 42 Figure 4.2 -Left : The user moves the center of the horizontal green plank. Right : The system maintains the connectivity between all the planks by changing the size and the position of all other planks.

Figure 4 . 3 -

 43 Figure 4.3 -This is the main view of the system. The user sees the box that she places in space as well as the material space in the bottom right corner of the interface. The planks have the same color in the material space than on the 3D view.

2← ∞ 3 BestOperation ← N oOperation 4 foreach 6 if CurCost < Cost then 7 Cost ← CurCost 8 BestOperation 9 foreach Edge E do 10 CurCostP

 34678910 Cost pair (Edge,Plank) in (E, P ) do 5 CurCost ← Snapping(E, P ) ← Snapping(E, P )

Figure 4 . 5 -

 45 Figure 4.5 -Snapping of left edge of plank A on plank B, with two parallel planks. The operation extends the size of A, to the right edge of B and adds a vertical plank(in yellow) between A and B. Top) Top View, Bottom) Side View.

Figure 4 . 6 -

 46 Figure 4.6 -Snapping of left edge of plank A on plank B, with two perpendicular planks. The operation extends the size of A, to the left edge of B to ensure static equilibrium. Top) Top View, Bottom) Side View.

Figure 4 . 7 -

 47 Figure 4.7 -Snapping of left edge of plank A on plank B. In this case, the vertical planks is intersecting with the object on plank B (left). The algorithm extends both planks to avoid the collision.

Figure 4 . 8 -

 48 Figure 4.8 -Snapping of left edge of plank A on plank B. In this case, the vertical planks is intersecting with the object on plank B (left). There is no way to snap the left edge of A without intersecting a box. This snapping is impossible and not considered during optimization.

Figure 4 .

 4 Figure4.10 -The user moves the avoidance zone (red box) and ask for the system to synthesize again. In both cases, the system carefully select the snapping operation to avoid this zone.

Figure 4 . 11 -

 411 Figure 4.11 -The user places a pillar in red in the middle of the room, and places objects around.

Table 3 . 1 -

 31 Statistics for cut design showing the number of planks, material usage ratio before and after the design suggestions/optimization.

		#planks ratio before ratio after
	Figure 3.13	4	0.78	0.89
	Figure 3.19a	7	0.66	0.92
	Figure 3.19b	9	0.66	0.80
	Figure 3.19c	8	0.76	0.83
	Figure 3.19d	16	0.79	0.86
	Figure 3.22a	6	0.85	0.96
	Figure 3.22b	11	0.85	0.97
	Figure 3.22c	8 3	0.74	0.97
	Figure 3.22d	16	0.89	0.98

http://www.kisslicer.com/

https://www.makerbot.com/download-desktop/

https://reprappro.com/

https ://redshift.autodesk.com/generative-design/

http://e3d-online.com/Cyclops

return DynamicEffectivenessConstraints(S, u, l)

Remerciements

org/setting-up-a-fab-lab/

Contributions

Algorithm 2: MinWastage Input: Design function D, starting design parameters X s Output: Set of best layouts found L 1 O s ← identity ordering ; // 1,2,3,... 2 X ← {(X s , O s )}; 3 for G iterations do We therefore proceed in two main steps, first determining a set of good orderings that then serve as starting points for continuously evolving the design, reducing wastage. The overall approach is described in Algorithm 2. The subroutine ImproveDesign is described in Section 3.2.3.1 while ExploreOrderings is described in Section 3.2.3.2. The process restarts for a number of iterations (we use G = 3) to jump out of local minima reached by the continuous design exploration. This results in the shape space exploration illustrated in Figure 3.15. The process returns the K best found layouts and designs and presents them to the user in thumbnails. She can then select her favorite design, and if desired update the constraints and restart the exploration from this point -which simply calls MinWastage again.

Algorithm 3: ImproveDesign

Input: Starting design parameters X and ordering O Output: Modified design parameters X b with reduced wastage if A(box(L posx p i ) < A(box(L posy p i )) then while true do X e ← ChangePartSize(X e ,s i ,1) ; // +1 pix. Output: Shrunk design parameters.

Docking algorithm The docking algorithm places each part in order by 'dropping' the next part on the current layout either from the right, or from the top. It locally searches for the best placement of each part, according to a criterion that minimizes wastage. The result is a layout L including all parts.

Given the layout so far our algorithm searches for the best orientation and best position for the next part. We denote by L i-1 the layout obtained for the i -1 first parts, and by L i ← L i-1 pos p i the layout obtained by adding the next part at position pos. The docking position pos is computed from a drop location (s, x, o), with s ∈ {top, right}, x a position along the corresponding axis and o ∈ {0, π/2, π, -π/2} an orientation.

The pseudo code for the docking algorithm is given in Algorithm 8. The drop locations are ranked according to a docking criterion that we denote D(L i-1 , p i , pos), explained next. The docking positions are computed from the drop locations by the ComputeDockingPosition subroutine. It is efficiently implemented by maintaining the right/top height-fields of the current layout as illustrated in Figure 3.18. Whenever evaluating a drop location we use the height-fields to quickly compute the docking positions that bring the part in close contact with the current layout.

Docking criterion

The docking criterion considers wastage as the primary objective, where wastage is defined by the ratio of occupied area divided by the bounding rectangle area of the layout. We denote W (L i ) the wastage of a layout including up to part i. It is obtained as

where A measures area and box(L) is the bounding rectangle of the layout. W is therefore the ratio between the area of the parts and the area of the bounding rectangle.

However, as the algorithm heuristically docks parts in sequence it cannot foresee that some spaces will be definitely enclosed. In particular, for newly inserted concave parts there are often multiple orientations of the part resulting in the same wastage : if the concavity remains empty there is no preferred choice. However, some choices are indeed better than others. If the concavity faces an already placed object, then further docking Feasibility constraints Some user edits may lead to planks intersecting with the boxes defined by the user (see Figure 4.4) -note however that this never happens after synthesis. Since the boxes represent the objects that will lay on the furniture, those collisions have to be avoided. For example, the user is also able to add avoidance zones which are zones in which there will not be any planks. Or, in order to maintain the equilibrium of the objects on the furniture, the planks that is supporting an object has to be bigger than the objects (see Figure 4.4).

Those constraints are not equality constraints and appear in the system only when it is necessary. They do not impact the topology of the furniture but they are necessary to ensure the feasibility of the furniture. Our key idea is to add constraints dynamically in the system to prevent moves that impact design feasibility.

We observe that all the feasibility constraints can be enforced by dynamically adding or removing equality constraints. For instance, when a plank is about to hit an object a constraint can be inserted to maintain the plank at the correct distance. A key difficulty is when and in which order to insert the constraints. Note that a straightforward approach can quickly over-constrain the problem, preventing to find a feasible solution.

Our scheme is inspired by collision detection in physics simulations, where all contacts within a potentially large time step have to be found. The intuition is to detect the first time a constraint violation occurs, while progressively applying the vector change u with u i = δ on the variable that the user changes, u k = O everywhere else. That is, we parametrize the problem with a variable α ∈ [0, 1] and find the smallest value α 1 such that U (S) + α 1 u verifies all design effectiveness constraints, but one or more are violated on α 1 + for any > 0. We then add an appropriate equality constraint to C such that all design effectiveness constraints are enforced. The algorithm then recurses until reaching α = 1. During this entire process we take care of enforcing design constraints while exploring along u. All constraints added during the process are discarded upon termination. The full algorithm is given in Algorithm 9.

The function AddDynamicConstraints considers the points just before and just after constraint violation, and adds the equality constraints required to resolve the case. For instance, if a plank collides an object of height H, it adds a constraint to keep the colliding plank at a distance of H of the plank supporting object. This is a very flexible approach allowing for a variety of feasibility constraints.