The 3D Printer Packing Problem

Form Labs recently announced the launch of the Fuse 1, a desktop SLS printer that will print all your parts using nylon powder and a laser. This a fundamentally different method of 3D printing as compared to filament-based machines, and the best way to use a Fuse 1 is to fill the entire volume of the machine with 3D printed parts. [Michael Fogelman] decided to investigate the 3D packing problem, and managed to fill this printer with the maximum number of 3D printed tugboats. If you’re wondering, it’s 113, as compared with 82 tiny Benchies using naive bin packing.

The formal definition of this sort of problem is the bin packing problem, or simply calculating the maximum number of items can be packed into a finite volume. There is no general solution to this problem, and it’s probably impossible to create an algorithm that will solve this problem for any collection of 3D models. Nevertheless, it’s possible to create a solution that shows marked improvement over a naive solution.

[Michael]’s solution involves simulated annealing. This algorithm begins by randomly placing tugboats, then mutating the position or rotation of one of the boats for each iteration. The code is less than 1000 lines of Go and is available on GitHub if you already have an SLS printer at your disposal.

It should be noted this type of problem isn’t particularly new to the world of 3D printers. There have been a few tools to solve the bin-packing problem for filament-based printers, but the solutions to these problems are two-dimensional; since filling a bed is a problem that only uses the ‘shadow’ of the Z-axis of each part, it’s a slightly easier problem to solve.

Now that Form Labs’ Fuse 1 SLS printer has been announced, there is a new application for this type of problem in the space of 3D printers. It’s not a perfect solution — and it’s doubtful there will ever be a perfect solution — but if you’re looking for a way to fill the volume of your powder printer with parts, this is the best you’re going to do.

20 thoughts on “The 3D Printer Packing Problem

    1. Not exactly. An algorithm to “solve” this problem means the algorithm finds the optimal solution, always. Michael’s algorithm finds a solution that is usually pretty good, but is not guaranteed to be optimal or even close. Not to take away from his work in developing a working tool to do this for the benefit of all of us, but simulated annealing is not new nor novel in being applied to this problem.

      1. Spot on. As Fogleman states, “The Fuse 1 SLS printer can print at least 113 3DBenchy boats.” The Hackaday article misstates this as the maximum number that can fit. It’s entirely possible that 113 is in fact the maximum, but Fogleman does not show this nor does he claim to have shown this.

          1. Hmmm… Mr. Benchoff said this, “— but if you’re looking for a way to fill the volume of your powder printer with parts, this is the best you’re going to do.” Emphasis on the word “best”. So he said that just to Wind-Us-Up? Maybe! Evil sometimes lurks where you least expect it ;-)

    2. Well no it isn’t impossible. In fact finding the optimal packing is trivial – just extremely slow. In short: generate all possible packing patterns and select one that is optimal.

      The problem is that the slowness is so extreme any non-trivial version of it isn’t likely to finish before the heat-death of the universe.

  1. If you really NEED the optimum solution you might not be doing it right. At that point it sounds like one is trying to use a 3d printer for manufacturing rather than one off prototypes or personal items. If you need to produce a lot of something you might be a lot better off just printing a few re-usable molds and using some sort of epoxy.

    1. I believe the point is to demonstrate a proof of concept algorithm for maximizing build volume by packing rather than just mass manufacturing a single part. This is useful to maximize machine utilization if there are a lot of parts to print. Recoating on these type machines takes significant time, and reducing wasted space means you can print more efficiently.

      Besides, 3d printing is sometimes the only practical manufacturing method for some geometries, and it’s then actually viable for mass manufacturing.

  2. Is that not a problem the industry should have solved already? There are large manufacturers of huge powder sintering printers, service bureaus offering you some space in these printers for your little model… and there are more similar services, like the PCB manufacturers that take random boards from clustomers and try to fit them into a production planel and maximize profit by selling as much of that panel surface back to the customers as possible.
    It seems strange to me that this is a problem that needs solving or has not been attacked and solved by now. Or are the solutions used i nthe industry all patented and locked down as trade secrets?

    1. High end printers already come with software to handle the batch jobs. More exactly: expensive machines with expensive software and expensive contracts for maintenance, raw materials, etc.

      But this code ignores one important thing: random orientation is only useful if you don’t care about the physical (elongation at break, flexural modulus, dimensional precision, etc) and cosmetic (surface roughness, layers, etc) properties of the print, or even the printability (failed vs successful batch caused by cooling, thickness, etc). Sometimes you really want something to be placed one way, and only that way or equivalent (you want something along Z axis, with some features at top and others at bottom, so rotating using that axis is fine, but the top-bottom must be respected). If you don’t care were is the worst of a print, fine, if you want to push the worst to the less important place, then you want to at least set some orietation constraints.

      Basically this code is playing the 3d print lotto, like with certain 3d print services.

  3. Just put it in a physics simulator and jiggle them around until you get the highest count density, clearances to keep them from merging. I call it the S.S. Benchy Chaos Theory.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.