We are at war with the coronavirus. In times of war, logistics and supply chains are critical to success — and ours are stretched so tight they’re beginning to break. 3-D printing — which some say is the solution to everything — can help give manufacturers the flexibility they need to survive in an overstretched system.

Historically, armies would bring mobile metal forges into battle to repair and resupply armaments and horses without needing to rely on lengthy and brittle supply lines. Today, troops travel with mobile 3-D printers. They create the parts they need on the spot and in volatile situations. The U.S. Marines, for example, use a metal 3-D printer to create vehicle and weapon parts in the Indo-Pacific region — a decision that frees up teams who would otherwise spend hours carving parts out of metal blocks and avoids the downtime associated with ordering from the United States.

We can apply the same logic for supply-side shocks and demand spikes. Manufacturers can harness the power of a distributed, digital 3-D printer network to alleviate shortages of critical medical devices and consumer goods that have run out of stock.

However, the answer isn’t to print everything. The biggest opportunity is to use the modern 3-D printer as a multi-tool to print the missing part to quickly switch a production line from making perfumes to making hand sanitizer, get a stalled factory up and running, or to make the essential valve that turns a plastic tube into a ventilator. For example, Ford Motor F, -0.68% and General Motors GM, -1.31% have said they could potentially step in to produce ventilators if needed. In a situation like this, 3-D printers could easily enable the auto makers to switch production lines to begin producing different parts and components in contrast to what’s typically produced on an automobile line.

Read:GM, Ford are ‘exploring’ making ventilators for coronavirus patients amid shortage fears

High volume vs. small batches

For several decades, experts have pointed to 3-D printing as the solution to our supplier woes, boasting about 3-D printing everything from automobiles and airplanes to mass producing toys in our living rooms. But this is all hype, not reality. Modern manufacturing is extremely good at optimizing the creation of high volumes of standardized, low-cost parts. But it fails when more responsive solutions are required. And in times of war, responsiveness is the difference between life and death.

For example, Micro-X, an Australian X-ray machine manufacturer, is using 3-D printing to speed production of its portable, lightweight X-ray machines to fulfill increased orders from hospitals with coronavirus patients. Because it can rely on its 3-D printers to create lightweight parts, Micro-X is fabricating the components it needs much more quickly than traditional methods—allowing it to scale up to meet demand.

3-D printing is more cost-effective than traditional manufacturing in small batches. It eliminates the distance between design and production so manufacturers don’t need to rely on external suppliers who may take weeks to deliver two or three custom parts. Instead, they can print them in hours.

Above all, though, being prepared and flexible, especially when others are not, far outweighs the factor of cost in the face of unexpected high demand and low supply.

We need to be agile to win this war and 3-D printing is the most flexible tool we have—the digital forge we can bring to the front lines of the current battle. It can bring an idea to reality. It gives organizations the ability to think creatively and react quickly. When baked into innovation and problem-solving cultures, it can unlock boundless opportunities from engineering teams and create cost and time savings for the business. And when we’re faced with a global crisis, it lets us test hypotheses quickly and create the tool a hospital needs — now.

Preparedness means more than being ready for what you can see coming. It means having the flexibility and resources required to meet every contingency that might come next.

Greg Mark is the CEO of Markforged, a manufacturer of 3-D printers for industry based in Watertown, Mass.