Space travel favors light packers, since launching a single pound of stuff costs an eye-watering $10,000. But NASA likes to be ready for anything, which is easier with more supplies. So what’s an agency on a budget to do?

Next spring, the International Space Station will get a new piece of equipment designed to help tackle this problem. Called the Refabricator, it’s a mini-fridge sized machine that can take a plastic component, melt it down, and print a new component out of the same plastic. It’s the first machine to combine recycling and 3D printing into one device, even here on Earth.

But while its destination is the ISS, it’s aimed at NASA’s goal of going much farther. It takes just a few hours for a resupply mission to reach the space station, but NASA has its eyes set on the Moon and Mars. “That’s a very different model,” says Niki Werkheiser, who specializes in in-space manufacturing at NASA. New supplies would take weeks to reach the Moon and months to reach Mars—and that kind of transit time makes forgetting your keys very unappealing.

NASA has been intrigued by a 3D-printing “MacGyver box” as a solution to the hazards of an incomplete packing list for a long time. In 1999, the agency put a 3D printer on the so-called Vomit Comet, a parabolic flight that produces 25-second spurts of weightlessness to test how the process could be affected by gravity changes. But at the time, Werkheiser said, patents covering 3D printing made doing things with the technology more complicated.

That meant the space station didn’t get its first 3D printer until 2014. Its successor, the Additive Manufacturing Facility, was launched last year, also run by a commercial company, called Made in Space. The machine prints both for NASA and for customers on Earth.

But those machines still need to be fed fresh plastic, with its large launch price tag. “If you have to launch all of the raw feedstock, how is that really helping?,” Werkheiser says.

That’s where the Refabricator’s recycling side comes in. Recycling plastic on Earth is both expensive and inefficient—and that’s before you add in the unique constraints of the space station, like microgravity and strict safety rules.

Typically, plastic recycling first pulverizes the material into a powder (Rachel Muhlbauer, who leads research and development at Tethers Unlimited, Inc., compares it to a coffee grinder), then uses a different machine to turn it into new base plastic.

But that isn’t an option in space, where the absence of gravity makes any form of powder a serious danger to astronauts. So the Refabricator instead melts the plastic down to create a new base material, called filament—and it turns out that does less damage to the plastic itself, which means the same material can be used more times, without needing to be diluted by fresh, non-recycled plastic. “A lot of the terrestrial ways of making filament generates a lot of waste,” Muhlbauer said. The Refabricator avoids that. “You put the material in and you get that material right back out.”

To read the full story, visit