Glenn House and his colleagues spent more than four years making a new toilet for the B-1 Lancer. The challenge wasn’t fitting the john into the cockpit (it went behind the front left seat), but ensuring that every part could handle life aboard a plane that can pull 5 Gs, break the sound barrier, and spend hours in wildly fluctuating temperatures. The end result didn’t just have to work. It had to work without rattling, leaking, or revealing itself to enemy radar. Having it OK'd for use aboard the bomber was just as complex as making it. “Getting a part approved can take years,” says House, the cofounder and president of Walpole, Massachusetts-based 2Is.

Until last year, 2Is was in the military parts business, furnishing replacement bits for assorted defense equipment. (Pronounced “two eyes,” it sold off the parts business and now focuses on defense-related supply chain software.) Providing spare parts for the military is a peculiar niche of the economy. Things like aircraft and submarines spend decades in service, and the companies that made them or supplied their myriad parts often disappear long before their products retire. So when something needs a new knob, seat, or potty, the military often turns to companies that specialize in making them anew.

Stay in the know with our Transportation newsletter. Sign up here!

These outfits must work from dusty two-dimensional drawings or recreate long-lost molds, but exactly match the standards of the original parts. Working on very small orders—sometimes for just two or three of a given item—they don’t enjoy the economies of scale that make it reasonable to spend five figures on tooling. A fussy approval process can mean waiting years to recoup an investment. And so, in many cases, they don’t bid on these military contracts, preferring steadier, more reliable jobs.

That’s a problem for the Air Force, whose fleet dates largely from the Cold War. Its C-5, B-52, and KC-135 planes average 40, 56, and 57 years old, respectively. The average Air Force aircraft is 23 years old. Every quarter, the military branch sees 10,000 part requests go unfilled, despite its readiness to pay an exorbitant amount of money to replace bits and bobs that once cost pennies—try $10,000 for a toilet seat cover in a C-17 Globemaster III.

“We’re gonna have to find better ways to keep old things flying,” says Will Roper, the assistant secretary of the Air Force for acquisition technology and logistics. And he has one, represented by the toaster-sized piece of plastic he keeps in his office. It’s a latrine panel for a C-5 Supergalaxy cargo plane. In the past, the Air Force has paid $8,500 to replace this part. But this one cost just $300, because it’s 3D-printed.

Roper says that 3D printing, also called additive manufacturing, can produce many of the parts for which the Air Force finds itself desperate, from C-5 gasket handles to F-15 longerons. “If I need two or three parts for a B-52,” he says, “I can just turn that over to one of our printers.” In the past few years, the Air Force has made thousands of parts this way, and it can work for just about anything made of metal or plastic. Composite and carbon fiber could work too, even circuit boards.

“We’re gonna have to find better ways to keep old things flying.” Will Roper, assistant secretary of the Air Force

But a novel approach means novel problems. It’s still not easy to turn a two-dimensional drawing into something a 3D printer can understand. The Air Force needs new ways to prove that these parts can handle the rigors of life in the air, that they’ll be as durable and reliable as the originals. Its scientists are exploring new techniques and creating their own mixes of metals to suit their needs. But Roper’s eager to move their work out of the experimentation phase.