You are on page 1of 10

EUROGRAPHICS 2015 / O. Sorkine-Hornung and M.

Wimmer Volume 34 (2015), Number 2
(Guest Editors)

3D Fabrication of 2D Mechanisms

Jean Hergel and Sylvain Lefebvre

Inria Nancy Grand-Est, France



(a) (b) (c) (d) (e)
Figure 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.

The success of physics sandbox applications and physics-based puzzle games is a strong indication that casual
users and hobbyists enjoy designing mechanisms, for educational or entertainment purposes. In these applications,
a variety of mechanisms are designed by assembling two-dimensional shapes, creating gears, cranks, cams, and
racks. The experience is made enjoyable by the fact that the user does not need to worry about the intricate
geometric details that would be necessary to produce a real mechanism.
In this paper, we propose to start from such casual designs of mechanisms and turn them into a 3D model that can
be printed onto widely available, inexpensive filament based 3D printers. Our intent is to empower the users of
such tools with the ability to physically realize their mechanisms and see them operate in the real world.
To achieve this goal we tackle several challenges. The input 2D mechanism allows for some parts to overlap during
simulation. These overlapping parts have to be resolved into non–intersecting 3D parts in the real mechanism.
We introduce a novel scheme based on the idea of including moving parts into one another whenever possible.
This reduces bending stresses on axles compared to previous methods. Our approach supports sliding parts and
arbitrarily shaped mechanical parts in the 2D input. The exact 3D shape of the parts is inferred from the 2D input
and the simulation of the mechanism, using boolean operations between shapes. The input mechanism is often
simply attached to the background. We automatically synthesize a chassis by formulating a topology optimization
problem, taking into account the stresses exerted by the mechanism on the chassis through time.

1. Introduction context, where efficiency and reliability of the created mech-
anisms is the top priority.
Designing and modeling mechanisms is a difficult, highly
technical task. Therefore significant research effort is ded- However, there are many indications that casual design-
icated to automate their generation. For instance, the most ers and hobbyist actually enjoy designing mechanisms, from
advanced techniques are capable of synthesizing complex the video games The Incredible Machine (Dynamix, 1993)
trains of gears and cams [ZXS∗ 12], produce mechanical and Crayon Physics Delux (Hudson Soft) to physics sand-
automatons from (virtual) animated characters [CTN∗ 13, box applications such as Garry’s mod (Facepunch Studios),
CLM∗ 13, TCG∗ 14], or generate functional designs with Phyzicle (by A. Shirinian) and Algodoo (Algoryx). Using the
hinges and slides from a high level specification [Koo14]. later, thousands of users create and share intriguing mecha-
This is a very important trend of research in a professional nisms modeled in two dimensions. These are used for educa-

c 2015 The Author(s)
Computer Graphics Forum c 2015 The Eurographics Association and John
Wiley & Sons Ltd. Published by John Wiley & Sons Ltd.

hobbyists — with a way to bring their de- signs to reality. cranks and cams are not ing some parts to overlap. contacts are exploited by the mechanism. for which two making objects stronger [SVB∗ 12] or ensuring that designs possible fabricated solutions are shown in Figure 2. difficult modeling process required for fabrication. exploit both layering and inclusion (Figure 2. from a high level specification of c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd.e. 2. [ZXS∗ 12] proposes to automati- parts include one another. Consider the model of Figure 1. It produces less out- contains the 2D geometry of the mechanical parts. fixed). cams. [CTN∗ 13] automatically generates a mechanism in- Contributions side an already articulated model so as to reproduce an an- • We solve for the 3D layout of the mechanism by exploit. of-plane motions as axles are connected on both extremities. In this paper. This typically involves optimizing the ge- produce out-of-plane motions. a recent 3D printed mechanisms are very sensitive to bending trend of research proposes novel algorithms to help design- stresses. imation sequence. multiple rigid objects. mechanisms (i. stresses. nisms called oscillation modules inside an articulated char- • We define the 3D shapes of the final parts by construc. without having to go through the tedious and Figure 2: Possible solutions for the example of Figure 1. and information regarding which parts can interact during simulation and which are • We automatically synthesize a chassis for the mechanism allowed to move across each others. in this case Algodoo (Algoryx). or mechanisms where complete: The final 3D shape of each part has to be deduced parts can fall or detach). Our goal is to empower casual mechanism designers — kids. mechanisms that may generate excessive Second. Our approach makes no assumption regarding the shape First. We have to produce a 3D model tagged in the input. These Limitations Our algorithm does not detect unrealistic interactions have to be preserved within the final mechanism. in particular orthogonally to the material deposition ers identify and fix problematic geometries. [Koo14] automatically produce the parts throughout the mechanical simulation. Conversely. CCA∗ 12] or deformable characters [STC∗ 13] from their vir- tached to one extremity of their axles and bending stresses tual counterparts. To reduce this issue our mechanisms Several approaches focus specifically on mechanisms. that may exhibit singularities. producing parts with a complex profile in depth allowing other parts to slide within or along them. starting from an underspecified two-dimensional model of a mecha- nism. the bending stresses are absorbed cally generate a mechanism producing a desired motion on on both extremities of the axles. Left: Print out of our result using layering only. teachers. we have to tackle several challenges. Algorithms parts are layered next to each others the wheel tends to move have also been proposed to fabricate articulated [BBJP12. allowing parts to interact to produce gears. for instance direction. preservation of the set of contacts and interactions from the responding 3D parts are never in contact. Right: popular physics sandbox. The work of Coros et al. Finally. Middle: The input to our algorithm is the unmodified output of a Out-of-plane motion resulting from using layering. J. reducing out-of-plane mo. Hergel & S.6). Thus. This often involves cannot be resolved by layering or inclusion (Section 4. some 2D mechanism into the fabricated mechanism. Previous work anism has to be enclosed and supported by a chassis. It Print out of our result using inclusion. This chassis is typically missing nical task. The oscillation modules are optimized to reproduce a tive solid geometry (CSG). and sliding motions. which Modeling objects for 3D printing is a challenging and tech- acts as the ground body. ensuring that the cor. the mech. To achieve our goals. Computer Graphics Forum . using topology optimization. moving parts and axles. the spec. Koo et al. as many constraints from the physical world and from the specification and has to be automatically generated. but are accurate enough for early prototyping of small mechanisms. we seek to fabricate real mechanisms that can be 3D printed on inexpensive filament printers. Lefebvre / 3D Fabrication of 2D Mechanisms tional and entertainment purposes. [CLM∗ 13] embed mecha- ing inclusions whenever possible. Our approach takes into ac- gorithm is a mesh ready for fabrication on a fused filament count the forces generated by the mechanism on the chas- fabrication printer. The output of our al. sis during the entire simulation. BWBSH14]. the mechanism functions in two-dimensions by allow. ification of joints (hinge. middle): the moving parts are at. the two-dimensional specification of the parts is in. This is worsen by the necessary tolerances between tures to achieve the desired degrees of freedom. The mecha- tions and avoiding to propagate bending stress to other axles. acter. When The work of Zhu et al. If the are properly balanced [PWLSH13. considering the positions of target animation. of the mechanical parts: gears. the printing process have to be considered. typically an animated toy. Some over-constrained 2D designs from the simulation of the mechanism. nism is hidden in a box below the object. right). out of its plane (Figure 2. an effect that cumulates on ometry and automatically modeling joints or internal struc- all axles. Duygu et al. articulations in a design. They function properly through the where these collisions do not occur.

The synthesized chassis appears in pink. This is solved by a layering approach: the potential collisions are 4. Computer Graphics Forum . folding or opening panels covering certain areas. our approach never changes the input mechanism and therefore cannot improve or cor. our technique favors inclusion of parts within Box2D library. is done by simulating the input 2D mechanism using the In contrast. While we fully agree on the importance of automatic all mechanisms due to additional geometric constraints and synthesis of mechanisms. Lefebvre / 3D Fabrication of 2D Mechanisms a part may have holes. While the former focuses on Our approach produces mechanisms favoring inclusion be- professional designers. tected (such as having both A ⊃ B and B ⊃ A). our goal is to also promote the pos- interactions between parts. Our approach starts by simulating the mechanism to con- tion problem (CSP). [MTG∗ 14] propose to assist the user in creating elegant linkage based animated figures.1). cranks and cams of any (Section 4. It keeps track of overlaps – to place parts side by side on a same axle. n6 n1 We denote the set of joints: n2 n5 H = {(Pi . but it tends struct the set of observations. which is then turned into a fabricable 3D model.4). but only locally. Hergel & S. and whenever inclusion cannot be used. In contrast synthesis techniques often rely on a which parts can include which others (Section 4. These con- tradictions are transformed into layering rules. each described by a 2D polygon. The layout step determines the relative positions of parts and assigns them with a depth interval. each others.g. This is a natural solution. the parts overlap in the 2D specification without interacting. The polygon of of part Pi at time t. Analysis identified and the parts are assigned different layers to avoid collisions. The geometry synthesis step determines the exact ated mechanism. targets ca. Our system is able to locally switch to layering We assume mechanisms to have a periodic motion. Edge orientation indicates which tegers. This can be formulated as a constrained satisfac. Overview set of T time frames. using the layout and the motions The crankshaft configuration automatically results from the resulting from the simulated mechanism. until contradictions are de- gears – to make the problem tractable. with li ≤ hi two in- to construct the layout. The parts may be connected through hinges and fixed joints. Pj connected by an hinge or a fixed joint} Our approach involves three steps: layout (Section 4). tween parts. c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. The final op- Several of the aforementioned techniques [CTN∗ 13. This tions and bending stresses on the axles (Section 1. Our al- set of pre-determined mechanical parts – typically bars and gorithm greedily add inclusions. These three steps are illustrated in Figure 3. Figure 2). resulting in out-of-plane mo.1. We however impose no constraint on the parts and mechanism. TCG∗ 14. The layout process starts by analyzing the simulated rect it. We denote I(Pi ) = Figure 3: Left: Input 2D mechanism. hi ] the interval assigned to part Pi . or a user selected maximum time is reached. while the red edges show which enting edges in a graph capturing contact and collision con- parts have to be layered. the work of Megaro et al. Middle: Graph used [li . Thomaszewski et al.N − 1}. Inclusion alone cannot work on ings. sometimes with parts that overlap without colliding – and interactions – parts significant space in between. This is used in particular to resolve cases where sual users through an accessible. T [. Mechanical layout al. but has to form a single component. Right: Two views of the gener- straints. thesizes a chassis for the mechanism: a geometry for the main body holding everything together. The inclusions between parts are determined by ori- part include which other. trary to synthesis techniques. Con- sorts to layering. The result is a 3. n3 n7 n4 geometry synthesis (Section 5) and chassis synthesis (Sec- tion 6). the designers intent: e.3). This information provides us with a set of shapes as their functions arise from their 2D geometries and observations that are used to make hypotheses regarding interactions. run the simulation until a prior configuration is encountered. For these cases our approach re- sibility for casual users to directly design mechanisms. tracking overlaps and interactions between parts their interactions: we support gears. Pj )|Pi . We denote by Mit the position matrix The input to our algorithm is a set of N parts P = {Pi |i = of part Pi at time t ∈ [0. and denote by Mit Pi the polygon 0.. [TCG∗ 14] and Megaro et 4. that are allowed to be in contact during the simulation. timization assigns depth values to the intervals by solving a CLM∗ 13. simple interface. MTG∗ 14] synthesize a 2D mechanism constrained satisfaction problem (Section 4. 3D geometry of each part. The last step syn- inclusion and layering constraints. The main advantage of this approach is to reduce mechani- These approaches focus on the automatic synthesis of the cal jitter: the hinge axles are much stronger when supported mechanism: the user does not directly model its inner work- on both their extremities. J.

We also have  ⇒ (I(A)\ ∪∀P⊂A I(P)) ∩ I(B)\ ∪∀Q⊂B I(Q) 6= ∅ H ⊂ O since all parts sharing a joint also overlap. Pk (k 6= j) if the temporal sweep of Pj overlaps with attempt to include parts into one another. Pk . An edge (Pi → Pj ) implies that I(Pi ) ⊃ I(Pj ). Note that these constraints will be combined and may left). Generating inclusions within its depth. Whenever inclu- the joint between Pi . Pk then we request that Pj includes both Pi and I(A) ⊃ I(B)). Inclusion relationships are determined by orienting the H These cases are illustrated Figure 4. To this end. act as they share no interval in depth. results in a rule regarding their intervals: lation. 3. Pj ) ∈ / O. Note that the overlap test is consid. Right: During simulation. Pk . then B cannot be included within A (and vice-versa) as they Additional observations are made about the mechanism. then Pi The goal of this step of the algorithm is to generate as remains connected through the axle and is not erased by Pj . Pj we have (Pi . The set of edges is the union of the joint set ⇒ I(A) ∩ I(B) = ∅ H. Pj )|∃ t such that Pi . sion cannot be used we fallback to layering. When orienting the edges we take care not to contradict the interaction rules (recall that A includes B is in- compatible with A interacts with B. The configurations can be mixed.3. Figure 4: Left: The bar A sweeps across the (fixed) bar B. We denote the set of interacting parts as: 1. A part Pj is said to de. Pj ) ∈ (Pi . see Section 4.2). a conflict. A interacts with B / C and (Pi . They are is tagged to track which set it belongs to (edges in both H mutually exclusive: if A is layered with B they cannot inter- and O are tagged as belonging to H). also share no interval. I(Pi ) ⊃ I(Pj ) ⊃ I(Pi ). Pj )|∃ t such that Pi . detaches Pi . i. This is done by verifying that no inclusion path is formed between two parts A and B if they interact in the input mechanism. we The second are detachment cases. H ∪ O ∪ C). If A is layered with B. A layered with B From these sets we define the mechanism graph as G = (P. the overlap set and the contact set. Mechanical configurations O = {(Pi . exploit the observations made during analysis and greedily tach Pi . At this stage we ering the diameter of the joint axle (5 mm in practice).T [ ((Mit )−1 Mtj Pj ) = ∅ and (Pi . If A includes B. The goal is to find an acyclic orientation: an inclusion cycle would pro- duce an unsolvable case of circular inclusion. many inclusion configurations as possible. we request A to include B and C so that their axle is not cut as seen from above. J. computed at the next stage (Section 4. Pj overlap at time t} The mechanisms we generate can produce three types of me- chanical configurations between two parts A and B. B cannot possibly include A within its depth or it would be disconnected in two independent parts.1). layering (right). The exact values of the depth intervals will be Pk to avoid having Pj cross the axle between Pi . Pj ) ∈ O ⇒ 2. Pj ) ∈ C ⇒ (Pi . interaction (bottom by A. they are not connected by a joint. Each We keep track of all interactions between parts during simu.g. Each edge in the graph These configurations are depicted in Figure 5. Computer Graphics Forum . part can include others that are in a layering configuration. c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. covering it entirely during the simulation. Pj ) ∈ /H the other two configurations. A includes B (denoted by A ⊃ B) C = {(Pi .4). In such cases. Hergel & S. Inclusion (top-left). In this case Figure 5: Two parts in the three possible configurations. A part Pj is said to erase a part Pi B is carved out from A (see Figure 5 top-left) and therefore if the temporal sweep of its polygon covers Pi entirely and they cannot interact. Pj are connected by a joint. Pj are in contact at time t} ⇒ I(A) ⊃ I(B) Note that for any two parts Pi . then the volume of The first are erasing cases. If Pi . In this case. and O edges of the mechanism graph G (Section 4. If Pj only determine relationships between the parts intervals (e. e. Lefebvre / 3D Fabrication of 2D Mechanisms We record all overlaps between parts in a set: 4.e. the bar A sweeps across the hinge be- tween B and C. in which case layering will be locally performed.g. the part Pi cannot include the part Pj as it would have to be split in two independent parts to fit Pj 4. A is said to erase B. More formally: Whenever possible our algorithm favors inclusion over Pj erases Pi if Pi \∪t∈[0. A is said to detach B and C.2.

Lefebvre / 3D Fabrication of 2D Mechanisms The orientation of some of the edges is constrained by the Chassis. in which case layering would auto- so that contradictions are more likely to appear on the edges matically be used between Pj and Pi . node. This involves checking for an exist. have Pi ⊃ . → Pk and denote L the length of this path. This is possible as long axles are generated. connected on both sides to the chassis.. seek to minimize the length of the longest path from every This forces Pi and Pj to be in different depth intervals in. tion minimizing L(Go . Computer Graphics Forum . To account for this. and because some I(Pi ) ⊃ I(Pj ) ⇒ li < l j and hi > h j earlier choices may violate the new constraints. where both I(Pi ) ⊃ I(Pj ) taches (Pi . We therefore ing configuration rule between the parts: I(Pi ) ∩ I(Pj ) = ∅. and remains a single ering on joints (set H) since this is the case where fragile part through the axle with the arm. We assign integer gorithm. In absence of constraints our goal is to avoid interaction rule. Let us assume such a descendant edges. Hergel & S. The axle between C and Pi will exist around switching to a layering configuration for Pi and Pj . E. In such cases. Intervals scendants we also follow interaction edges (edges in C) to where li = hi correspond to parts having the minimal thick- prevent the layered parts to include parts that have to inter- ness (2 mm in practice). The chassis appears as a part in the graph. The inter- possible we use a heuristic to select the orientation of low. we first determine which ori. Pu interact : this would result in a similar contradiction. tion. Con- sider a path in the oriented graph from part Pi to part Pk : Contradictions. For each edge in sequence. we can easily determine a lower bound. would then appear when orienting the edge (Pi . we apply the following ing constraint. This ensures that axles are supported on both sides. we have fore we do not know their exact size during graph orienta- encountered a contradiction. including part (Pi ) has one layer on each side of the included skipping the edges removed due to contradictions. we start by the edges with is cut by the inner arms. Pk ) ⇒ I(Pj ) ⊃ I(Pi ) and I(Pj ) ⊃ I(Pk ) Figure 2 illustrates a case where the chassis is involved in a detachment constraint.g. vals are optimized at the next step (Section 4. as Pj does not erase Pi . Pj ) where L(Go . Pi ) + L(Go . However.g. P) com- troduces an additional requirement on the graph orientation: putes the longest path from P to any other node in the ori- the parts Pi and Pj should not have any common descen. Nevertheless the wheel is properly a constraint. Pj : as both parts will be placed in non-intersecting depth intervals. Whenever we can freely entations are possible. We deal with contradictions by removing Pi → . and the edge being tested). G. in Figure 2 the main wheel axle then edges in O. When orienting an edge (Pi . we want to would produce an inclusion cycle.4.C) implies I(Pj ) ⊂ I(Pi ) and I(Pj ) ⊂ I(C). layering (e. it will exist in two parts attaching We orient the edges of G considering edges in H first and C and Pi on both sides. To guar- erasing and detachment cases: antee that it includes all other parts. Pv ⊂ Pj where Pv . they can no longer cross Inclusion. When checking for common de- ical thicknesses in the final object (see Section 5). Pj – even though Pj cuts it. we orient the chassis edges prior to considering any other edge in the graph. Pj de- during the orientation process. contradictions may appear taching primitive to be the most included. The goal of this section is to should not have a common descendant. c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. That is. This order is important: we prefer to avoid lay. which are later mapped to phys- olate such a requirement. In other words.e. I(Pi ) ⊃ I(Pj )). and then checking whether an orientation thickening the parts too much. and we reject any edge orientation that would vi- depth values to the intervals. Inclusions are captured by the oriented edges in their respective axles. J. We therefore orient the edges in H first. ented graph Go (the graph with only the previously oriented dant in the oriented graph. I(Pi ) ∩ I(Pj ) = Resolving a contradiction by layering removes all detach- ∅) and interactions. However. The set of descen- compute the depth values assigned to the lower and upper dants is easily maintained during the graph orientation al- bounds of each interval I(Pi ) = [li . we request the de- As a result of these constraints. Since we the problematic edge from the graph and by adding a layer. this in. every time a contradic- The previous step produces a number of rules relating the tion is detected we add the additional constraint that Pi .. Pu ⊂ Pi . act. This directly contradicts 4. where and I(Pi ) ⊂ I(Pj ) are required. Indeed a contradiction of O which are later considered. verifying whether an orientation violates any cost heuristic. Pj ). They result in the following inequalities: Since the set of constraints is updated. After the analysis we obtain three types of interval rules: inclusion (e. Pj erases Pi ⇒ I(Pj ) ⊃ I(Pi ) Pj detaches (Pi . Pj ) we select the orienta- stead of being included into one another. we restart the graph orientation every time a contradiction is resolved. i.. Orientation cost heuristic. Depth intervals I(Pi ) ∩ I(Pj ) = ∅. part (Pj ). ⊃ Pk . ment constraints between Pi . Such cases are resolved by C is the chassis. which guarantees that the When the process restarts edges are traversed the same order. choose the orientation of an edge. Pk exists. If no orientation is possible. Note the use of strict inequalities. it follows that |I(Pi )| ≥ L.g. hi ]. Pj depth intervals of the parts..4) and there- est cost (see below). We would have I(Pi ) ⊃ I(Pk ) and I(Pj ) ⊃ I(Pk ) which gives (I(Pi ) ∩ I(Pj )) ⊃ I(Pk ). If two orientations are keep the size of the depth intervals |I(Pi )| small. In each subset.

4 mm. Solver extrusion takes places between zli = (t + s)li and zhi = (t + s)(hi + 1) − s where t is the minimal thickness (2 mm) and s We directly translate these rules into an integer constraint the spacing tolerance between consecutive parts (0. The position of the part in depth reducing the combinatorial complexity for the CSP solver. cluded parts. Free assemblies require special care: in 3D nothing pre- niques.4 is a cylinder of axis z. This ensures that the parts will properly interact through • The geometry of hinge joints has to be produced. On overlapping edges: C. racks) are prop.6. This rule is more restrictive than the mechanism to print pre-assembled. Pj will have a spacing shape of the axle. the following: Interactions. The operations. We distinguish layering due to the removal of an overlapping edge (∈ O) from the layer- ing due to the removal of an hinge edge (∈ H). enabling their top or bottom layers.4 z ready to generate the final geometry of the 3D parts. or sub–assemblies of parts that are not connected to the back- However. They are detected as discon- only solution involves modifying the shape of the fixed joint nected components in the graph with only H edges.B. These rules are necessary to enforce that con. while orange indicates a hinge joint. between the two bars. is computed such that pieces allotted in consecutive layers are separated by a small space. The We call these free assemblies. of height and diameter 4. we found it sufficient in practice while the base volume of part Pi . spacing. we configure it to Pi . making room for C. ensuring that the axle between them is as In order to produce the 3D geometry we take into account short as possible. The final shape Si is obtained from Bi by subtracting from Minion returns the solution minimizing the sum of part the initial volume the time sweep of the pieces included in thicknesses. • Parts that slide along others without being attached to the (Pi . problem that we solve using Minion [GJM06]. The volume Si is precisely defined as:   Once the intervals are determined for each part. that is ∑N Pi . They result in the following • Parts that come in contact have to be modified to take a equalities: spacing tolerance into account (0. This constrains both parts to appear next to each others The output is the 3D geometry of each part. This system cannot be resolved by assigning different layers to A. All subtracted pieces are dilated by the contact tolerance return the best solution found after at most 90 seconds. However.. ensuring an including parent piece will support their axles on both sides. we are Si = Bi \ ∪ j∈N (i) ∪t∈[0. failure cases 0.C. by any of the existing tech. in- tacts exploited by the mechanisms (gears.N and their corresponding depth intervals I(Pi ) = [li . J. We restrict the space of integer to [0.4 mm in practice). This is not considered by our system nor. it could be. In such cases.5.B but will cut the fixed axle between Pi layered by overlap with Pj ⇒ li > h j + 1 or l j > hi + 1 A. to the best of our knowledge. hi ]. since in principle the parts interact as long as The base shape of a part is formed by the linear extrusion they share an interval where no included part exists (see Sec.D. nisms cannot be layered. Free assemblies. this does not guarantee success as some mecha- ground by any hinge: they are only sliding along other parts. through depth. Such a case is shown Figure 6. Hergel & S.. We denote by Bi tion 4.4 mm). Part geometry synthesis On hinge edges: This step of the process takes as input the set of parts Pi . • Parts have to be carved to allow for passage of other. recall however that we assume that they are properly locked c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. Discussion. 2 · N].T [ ((Mit )−1 Mtj B j ) ⊕ B0. as well as the time sweep of the pieces in contact with i=0 |I(Pi )|. parts will then be layered within the chassis.D can rotate around A. Computer Graphics Forum . 5. For an interval [li . The mechanism might include parts. i = Pi layered by hinge with Pj ⇒ li = h j + 1 or l j = hi + 1 0. along the z axis (depth) of its 2D shape. and a few 3D CSG parts in the graph and includes everything in the chassis. which becomes a crankshaft hosting the layered mechanism. the CSP solving for the intervals will vents them from falling out of their assigned depth interval – admit no solution. Right: The only solution is to change the These inequalities guarantee that Pi .2). the 4.B. hi ]. Figure 6: Left: Four bars seen from the top. Layering rules are produced when resolving con- tradictions on edge orientations. As Minion performs an ex- haustive search within the solution space. where N (i) = { j|(Pi . with N the number of parts. Pj ) ∈ O ∪ C}.D. We compute the shape by a combination of 2D oper- At worse our algorithm eliminates all edges between the ations using the Clipper library [Joh10]. of at least one between them. Lefebvre / 3D Fabrication of 2D Mechanisms Layering. ⊕ is the dilation oper- z ator and B0. erly captured by the 3D model. Pj ) ∈ C ⇒ li = l j or li = h j or hi = l j or hi = h j chassis have to be maintained at their selected depth. Black segments indicate a fixed joint.

but still lacks a chassis. Thanks to the cubic ex- This approach in currently limited to the case of free as. and are thus subtracted from the other parts that are in mizing the compliance maximizes the rigidity of the system contact (with a spacing tolerance). They physically constrain under the given forces. ing K(ρ) · u = f where K(ρ) is the global stiffness matrix assembled printing on filament based printers. the system tends to use semblies sliding against non-free assemblies: we do not sup. Computer Graphics Forum . Hergel & S. right). that is rently address this issue. process is summarized Figure 8. if a surface the number of time frames. mechanism. Sig01]. Right: Interlocking shape of the axles allowing for pre. Chassis synthesis tio of 0. as illustrated Figure 2. Alternatively the chassis could be ex- truded to the full mechanism depth and carved like any other 7. j . When creating the 3D coun- generating a fully connected structure. These fins are added to the base shapes Bi of the The compliance energy is defined as E(ρ) = f · u.2. By default the models are rescaled so it to be strong enough to support the efforts generated by the that their bounding box fits a 150 × 150 mm square. fn located at the grid nodes (element corners). J. We select a resolution of 2 mm per pixel. j ∈ [ρmin . This is made efficient by pre-factoring the stiffness matrix K and then solving for After this stage the mechanism is almost ready to print. with the only con- prefer the sandwiching approach in practice. assembled from the elements. The final outline of terpart of the mechanism we have to synthesize a chassis the shape is extracted by smoothing out the result with a box acting as the background. j is given by ρ3i. j ρi. We denote by ρ the vector of all element densities. port several free assemblies sliding against each others. without any user intervention. the finite element method can be used part. Lefebvre / 3D Fabrication of 2D Mechanisms This problem is elegantly answered by topology optimiza- tion techniques [Ben89]. note how the gear is also carved by the displacement vector for all grid nodes u is obtained by solv- fin. 6. e. but at the same time we would like to keep it small to reduce material use. The stiffness matrix of an el- ement ρi. 1]. The dle: Printed result. Background on topology optimization We cast chassis synthesis as a case of 2D topology optimiza- tion for minimizing the compliance energy [Ben89.35 and an elastic modulus of 2.. matrix of a square element in the target material. a Poisson ra- 6. 6. E(ρ) = ∑t∈T ft · ut where K(ρ)ut = ft . ponent in the per-element stiffness. Results part. print time and for aesthetics All the 3D mechanisms are generated automatically from reasons (a thick chassis would hide the mechanism entirely). We select the last value tives to the background ’wall’.g. maximizing the compliance over all time frames. so to reduce material use and print time we We modeled all our results using Algodoo. where A is the target area of the produced structure. We add the The chassis has to resist to the forces exerted by the mech- hinges by CSG. We do not cur. ut for all time frames. see Section 1. anism at all times. This is unnecessary unless the chassis is a crankshaft. local bulge to ensure the axle fits properly – in some cases This gives us a set of T force configurations.1. only 0 or 1 for ρi. sue by creating fins (protrusions) along the sliding parts. We optimize the chassis by along which two parts interact is modified. j Ke where Ke is the 8 × 8 stiffness inside the 2D mechanism. the scenes created in Algodoo. This energy is minimized by gradient the parts to remain aligned in depth.3 GPa (ABS plastic material).25. Mid.. straint that the mechanisms have to function properly in 2D and be in a valid position (interacting parts such as gears The trade-offs in synthesizing the chassis are that we want should not overlap). We produce a 2D geometry that is filter of size 3 × 3 and then contouring the isovalue 0.. We therefore record the forces at the If the part is too narrow the axle geometry will introduce a joints attached to the background for the entire simulation. j = A. see Figure 7. The target area A is set to 10% and then reduced When designing mechanisms in 2D the user attaches primi- until the structure is disconnected. carving the parts to let the axles through. The optimization domain is a grid of square elastic elements where each element i. where T is this can prevent the mechanism to function. see Section 5. We address this is. c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. Given a choice of densities and a set of fixed elements where the Figure 7: Left: The part in pink slides along the L-shaped structure is anchored. The used to sandwich the 3D mechanism in between two walls. f = f1 . Our approach generates fins around the sliding part to compute the planar deformation due to a set of forces so that it is locked in depth inside surrounding parts. Mini- parts. . The geometry of the hinges is designed to allow for pre-assembled printing (see Figure 7. j takes a density ρi. Chassis optimization Hinges. descent under the constraint that ∑i.

educators and 3D printing enthusiasts to fully ex- the larger model Figure 12 graph orientation takes 489 ms.1. Hergel & S. A major advantage of our algorithm is that it avoids search- The model has automatically generated fins along the slid. This model broke during clean up and we used screws given by their shape and the simulation. The Scissor model is a case configurations. We had better results using a weak infill four forces resulting from hinges at a given time frame (pink) pattern. Our mechanisms exploit the fact that 3D printers can pro- duce pre-assembled articulated objects. layering in such situations. Our sys- straint graph. All objects are printed in one piece.34 seconds. One possibility is to fallback to Leg model is a case that results automatically in a crankshaft. Computer Graphics Forum . their function is solely gear. pability of our printers. In particular after printing some force has to be exerted to free the mech- anism from inaccessible support. An the small leftover from the infill pattern on top of the gears. One issue we encountered is breaking of the plastic axles when applying force. Left: pattern for support.1) tom of the design indicates the base of the chassis. while exploiting inclusions wherever possible. broke when we freed the sliding port. We thank the Région Lorraine has to finish exploring the space to guarantee the optimal is for funding some of our equipment. for the small model Figure 1 graph orientation pre-assembled mechanism. Right: Cleaned model. the edge orientation cost heuristic. The green box at the bot- do not detect the case where a part is erased (Section 4. Run. allowing to explore several possibilities. cal details required to generate a valid 3D geometry for a For instance. The small brown box indicates the base for the chassis. emerge from the set of constraints. There can be aesthetics considerations to using inclusion The complexity of our printed results is limited by the ca- or layering. but Minion Forge (StG-2012-307877). Lefebvre / 3D Fabrication of 2D Mechanisms 7. Right: Final shape after smoothing and con- tour extraction. J. cre- these cases lead to a large number of possibilities for includ- ating a layering between the two central gears. Middle: Optimized densities after cleanup.1). Inclusion produces parts anism which is ignored by our system after simulation. this is not necessarily the best option of filament printers. See Figure 9 for an example of a print before and and attachment point (gray). This holding axles on both sides. for these forces. From top-left to bottom right: the Gear Puppet model is made of six gears 8. The Three ing parts into one another. ploit the potential of their printers. The gears have rotated. All the mechanical to repair it (see also Section 7. ing for explicit kinematic configurations. interesting direction of future work is to split the mechanism into pieces that are easy to assemble [LBRM12. mous reviewers for their help with improving the paper. It is actioned by a hidden mech. Minion returns the CSP solution in 7 ms. for instance. Minion returns the CSP solution after 90 seconds as it ex- plores for the best possible solution until the timeout. as well as the anony- found. The Wheel model illus- The are limitations in our current implementation. Most results are computed in a few seconds. For teachers. The EG flag model is a case of sliding part. tem is capable of keeping the overall design thickness small. The algorithm has ing part that are carved from both the L-shaped part and the no notion of what a gear or rack is. trates how part geometry is automatically created to allow joints can only be defined between two parts. with weak infill sup- flag design. We experimented both with dissoluble plastic and a weak filling Figure 8: Chassis synthesis by topology optimization. takes 154 ms. c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. We hope it will help hobbyists. using support. First. and to which part should include which other. Both of Train model is case of cyclic interaction between gears. Acknowledgments This work was funded by ERC Shape- ning for longer does not return a better solution. 3D printing We print all our objects on inexpensive filament printers in ABS and PLA plastic: a Replicator 1 from Makerbot. which is generally less sensitive shows how our algorithm alternates inclusions as a result of to mechanical jitter and stress. Conclusion with custom shapes. we for passage of included objects. However. The Gear by the cumulative effect of two or more other parts. Second. automatically where no chassis is needed. Our approach makes designing mechanisms less difficult by automatically dealing with many of the intricate techni- Performance. VGB∗ 14]. Figure 10 shows a number of printed results. for instance the crankshafts. and Ultimakers 1 and 2 from Ultimaker. note part and we had to use screws to reassemble it manually. It is also shown Figure 3. so that we do not have to consider the assembly stage. We show in Figure 11 and Figure 12 User control can be achieved by directly editing the con- outputs of our algorithm on more complex designs. Chassis optimization takes 2. The EG Figure 9: Left: Model after printing.

S TEED A. MÄ Ż CH [GJM06] G ENT I. 6 (2012). W HITING E.: Stress relief: improving structural strength of 3d print- PAULY M. 1.. C ALIAN D.. C OROS S. JAMES D. G RINSPUN E. Computational design of mechanical characters. 6 (2012). RUSINKIEWICZ S. J... ACM Transactions on Graphics 31. B ICKEL B. References G RINSPUN E. T HOMASZEWSKI B.. 120–127. W HITING E. T HOMASZEWSKI B. B ENES B..: Optimal shape design as a material 3D fabrication. S ORKINE -H ORNUNG O. 48:1– mocap sequences. P. W. S.. C OROS S. 8 [MTG∗ 14] M EGARO V.. 47:1–47:9.. [CCA∗ 12] C ALÌ J. S ORKINE - ten in matlab. constraint solver.. G AUGE D. J. WANG G. M ILLER G. [CTN∗ 13] C OROS S. S UEDA M EGARO V. 2.. C OROS S. 2010. ACM Transactions on Graphics 31... 6 322–332.. M ECH R. Please also refer to the accompanying video clips to see them in motion.. In Proceedings of ECAI 2006 print volume optimizer.. 2.. A. Computer Graphics Forum 33.. L I W. C ARR N.. M IGUEL I. A. 2 7 [Sig01] S IGMUND O..: Make It Stand: Balancing shapes for [Ben89] B ENDSØE M. ACM Transactions on Graphics 32. 3 tions on Graphics 32. C ARR N. S TAVA O. 2 186:1–186:11.: Computational design S. 4 (2013). 2 [SVB∗ 12] S TAVA O. scalable. ACM Transac. B ENES B.. M ATUSIK W.. ACM Transactions on Graphics 31. 4 (2013).: of linkage-based characters. P FISTER H. L.: Minion: A R.. P. G ALICIA J. 1.. 96:1–96:10. [CLM∗ 13] C EYLAN D.: Spin-it: Optimizing moment of inertia for 2 (2001).an open source freeware library [ZXS∗ 12] Z HU L.. H ORNUNG O.: Motion-guided mechanical toy modeling. Structural Optimization 1 (1989). 4 assembly. 129:1–129:9. ACM Transactions on Graphics (2013). S NYDER J. 3 Fabricating articulated characters from skinned meshes.. Hergel & S. B ICKEL B. 1. pp.. T HOMASZEWSKI B.. G AUGE D... 81:1–81:10. X U W. K AUTZ J.. 192–202. J EFFERSON C. BARAN I. 98–102. M ITRA N. 2 [STC∗ 13] S KOURAS M. ACM Transactions on Graphics 32.. 64:1–64:9...... articulated models. ACM Transactions on Graphics 32. 4 (2014)... 4 (2012).. B ICKEL B.. 1.. Computer Graphics Forum .: Packmerger: A 3d fast.. A. 82:1–82:10. 48:11. c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. 7 spinnable objects. 83:1–83:12. 2 31. 130:1–130:8..: 3d-printing of non. G ROSS M. pp... 123–130. F ORBERG M. 8 [Joh10] J OHNSON A. G ROSS M. VANEK J. 1. 6 (2012). L IU Y..... 3 [VGB∗ 14] VANEK J. ACM Transactions on Graphics 31. G ROSS M... ACM Transactions on Graphics 33. distribution problem. All these results are 3D printed on filament printers.: Chopper: Partitioning models into 3D-printable parts. 2 [PWLSH13] P RÉVOST R. 2 [Koo14] Creating works-like prototypes of mechanical objects. K LEINBERGER B ICKEL B. 127:1–127:10. S UMNER R. M ATUSIK W.: Chacra: An interac- tive design system for rapid character crafting. AGRAWALA M.: on Computer Animation (SCA) (2014). 3 [TCG∗ 14] T HOMASZEWSKI B. W EYRICH T... A MATI C.: A 99 line topology optimization code writ- [BWBSH14] BÄCHER M. N ORIS G. 217:1–217:9. deformable characters. 4 (2014). 6 (2014). Lefebvre / 3D Fabrication of 2D Mechanisms Figure 10: A variety of results automatically generated from the input 2D design. 4 (2012). G.. 6 (2013).. (2006). L EFEBVRE S. 6 B. 2 [LBRM12] L UO L. Structural and Multidisciplinary Optimization 21.: Clipper .. In Symposium [BBJP12] BÄCHER M.: Designing and fabricating mechanical automata from able objects..: Computational design of actuated R. ACM Transactions on Graphics 33. ACM Transactions on Graphics 33 (2014).. G UO for clipping and offsetting lines and polygons..

as well as the space carved for the inner bars in the bars actioning the wings. Hergel & S. J. Note the double gears including the bars. Computer Graphics Forum . No contradictions were encountered: there is no layering. The mechanism shown in transparency (top right) is generated from the design (top left). Lefebvre / 3D Fabrication of 2D Mechanisms n0 n12 n1 n10 n6 n4 n11 n14 n2 n7 n5 n8 n3 n9 Figure 11: Eagle model. 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). This model contains two crankshafts for steering the arms and legs. Inclusions are used in most places. The mechanism shown in transparency (bottom) is generated from the design (top). c 2015 The Author(s) c 2015 The Eurographics Association and John Wiley & Sons Ltd. Note the lightweight synthesized chassis. n0 n9 n1 n24 n14 n17 n5 n21 n16 n8 n7 n2 n19 n10 n22 n15 n4 n20 n13 n6 n18 n3 n11 n12 Figure 12: Frogger model. The mechanism graph (top left) shows inclusions and contact edges (bold blue). These were created by layering constraints (red bold edges in the graph).