MechFoundry: An agentic loop that poses and performs engineering analyses and optimization of real-world objects
Organizations: Cornell University, Ithaca, NY, USA · University of British Columbia, Vancouver, Canada
Abstract
AI agents can automate software engineering because a compiler or a test suite checks that the code does what the user or the agent intended. In engineering analysis, however, the steps that precede the computation have few easily verifiable checks: modeling a design or an object, deciding how it is used, where supports and loads are applied, and what material each part is made of. A human expert therefore makes these decisions, carries out the steps, and judges the result, one object at a time. We present MechFoundry, an agentic loop coupled with bespoke software that automates structural analyses of real-world objects without a human in the loop. From an object's lexical description, it generates a shape, poses a loading case relevant to how the object is used, assigns a material to each part, solves the nonlinear structural response, and improves the design against the loads it carries. A differentiable GPU solver built on an adaptive octree that need not conform to the surface enables the transition from shape generation to simulation and optimization. Across 50 everyday and engineering objects, the agent posed and solved a loading case in 6.5 minutes and for US$1.3 per object on average. Without a test suite to check against, we had language-model reviewers grade each session, as a first indication of where the agent's engineering judgment holds and where it fails.
Figures & tables
| Quantity | Default | |
| Generation | inference steps | (text, scribble), (image) |
| guidance scale | (image), none (guidance-distilled | |
| text and scribble model) | ||
| prompt / scribble conditioning weight | / (scribble), | |
| / (text) | ||
| random seed |
| Stage | Limit |
|---|---|
| TripoSG generation from text | , or when no watertight surface |
| was returned | |
| SDXL drawings | |
| Hunyuan3D-2.1 generations | |
| Photograph searches | , or when the first found nothing |
| CAD-Coder generations | , within the two generated bodies |
| Object | Haiku | Sonnet | Opus | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Geometry | BC | Material | Cost (USD) | Geometry | BC | Material | Cost (USD) | Geometry | BC | Material | Cost (USD) | |
| a TV remote control | M/M/M M | M/M/M M | L/L/M L | $0.13 | M/M/M M | M/M/M M | L/L/L L | $0.41 | M/M/M M | M/M/M M | L/L/L L | $0.85 |
| a USB stick | M/M/M M | M/M/H M | M/H/M M | $0.40 | M/M/M M | H/H/H H | M/H/M M | $0.52 | M/M/M M | H/H/H H | H/H/M H | $1.00 |
| an electric toothbrush | L/M/M M | L/L/M L | M/M/M M | $0.06 | M/M/M M | H/H/H H | M/M/M M | $0.44 | H/M/M M | H/H/H H | M/M/M M | $1.05 |
| a coffee mug | H/H/H H | M/M/H M | H/H/H H | $0.04 | H/H/H H | H/H/H H | H/H/H H | $0.39 | H/H/H H | M/M/M M | H/H/H H | $0.79 |
| a computer mouse | M/M/M M | L/L/L L | M/M/M M | $0.04 | M/M/M M | M/M/L M | M/M/M M | $0.34 | M/M/M M | M/M/L M | M/M/M M | $0.95 |
| Object | Haiku | Sonnet | Opus | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Geometry | BC | Material | Geometry | BC | Material | Geometry | BC | Material | |
| a TV remote control | H/H/H H | M/M/M M | H/H/H H | H/H/H H | M/M/M M | M/H/H H | H/H/H H | H/H/M H | M/H/H H |
| a USB stick | H/H/H H | M/H/H H | H/H/H H | H/H/H H | H/M/H H | H/H/H H | H/H/H H | H/M/H H | H/H/H H |
| an electric toothbrush | M/L/M M | L/L/L L | H/H/H H | H/H/H H | H/H/H H | H/H/H H | H/H/H H | H/H/H H | H/H/H H |
| a coffee mug | H/H/H H | H/H/H H | H/H/H H | H/H/H H | M/H/H H | H/H/H H | H/H/H H | H/H/H H | H/H/H H |
| a computer mouse | H/H/H H | L/M/L L | H/H/H H | H/H/H H | M/M/M M | H/H/H H | H/H/H H | M/M/M M | H/H/H H |
| Body-fitted | Body-fitted | ||||||||||
| Object | Flags | Diffuse Nitsche | Matched DOFs | Matched surface | Graded | Object | Flags | Diffuse Nitsche | Matched DOFs | Matched surface | Graded |
| a TV remote control | 49.4 | 49.5 | 57.0 | 49.0 | a car suspension control arm with rubber bushings | 82.1 | 81.7 | 76.9 | 80.1 | ||
| a USB stick | 43.1 | 43.2 | 50.3 | 42.3 | a truck leaf spring | 16.0 | 16.0 | 7.00 | 15.2 | ||
| an electric toothbrush | 17.2 | 17.2 | 11.0 | 17.2 | a car wheel with its rubber tyre | G | 308 | 279 | 708 | 318 | |
| a coffee mug | T | 260 | 260 | 249 | 256 | a car brake disc | S | 184 | — | — | — |
| a computer mouse | 108 | 108 | 237 | 108 | a crankshaft | G | 65.3 | 64.8 | 68.9 | 64.6 | |
| Body-fitted | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Matched DOFs | Matched surface | Graded | ||||||||||||||
| Object | Flags | (%) | (%) | (%) | (%) | (%) | (%) | |||||||||
| a TV remote control | 3.7 | 7.0 | 0.909 | 0.924 | 0.893 | 2.9 | 5.8 | 0.935 | 0.942 | 0.910 | 2.8 | 5.7 | 0.937 | 0.943 | 0.912 | |
| a USB stick | 1.4 | 4.4 | 0.871 | 0.886 | 0.841 | 1.1 | 3.8 | 0.886 | 0.904 | 0.847 | 1.0 | 3.6 | 0.886 | 0.907 | 0.851 | |
| an electric toothbrush | 15 | 22 | 0.773 | 0.828 | 0.755 | 8.4 | 13 | 0.876 | 0.858 | 0.823 | 12 | 17 | 0.824 | 0.826 | 0.761 | |
| a coffee mug | T | 4.7 | 10 | 0.869 | 0.885 | 0.842 | 4.6 | 10 | 0.872 | 0.887 | 0.840 | 4.8 | 10 | 0.868 | 0.884 | 0.837 |
| Body-fitted | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Diffuse Nitsche | Matched DOFs | Matched surface | Graded | |||||||||||||||||
| Object | Flags | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) | Mesh retries | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) | Mesh retries | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) | Mesh retries | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) |
| a TV remote control | 0 | 0.336 | 0.725 | 0.725 | 0 | 0 | 4.46 | 0.654 | 0.654 | 0 | 0 | 4.71 | 0.924 | 0.704 | 0 | 0 | 4.58 | 0.646 | 0.646 | |
| a USB stick | 0 | 0.305 | 0.868 | 0.603 | 0 | 0 | 4.26 | 0.844 | 0.644 | 0 | 0 | 4.36 | 0.963 | 0.710 | 0 | 0 | 4.47 | 1.09 | 0.630 | |
| an electric toothbrush | 0 | 0.172 | 0.939 | 0.785 | 0 | 0 | 3.63 | 2.17 | 1.44 | 0 | 0 | 3.55 | 1.60 | 1.15 | 0 | 0 | 3.83 | 1.87 | 1.50 | |
| a coffee mug | T | 0 | 1.40 | 4.13 | 2.22 | 0 | 0 | 14.5 | 4.36 | 1.65 | 0 | 0 | 14.1 | 4.14 | 1.58 | 0 | 0 | 16.3 | 4.25 | 1.63 |
| Body-fitted | Body-fitted | ||||||||||
| Object | Flags | Diffuse Nitsche | Matched DOFs | Matched surface | Graded | Object | Flags | Diffuse Nitsche | Matched DOFs | Matched surface | Graded |
| a TV remote control | 209 | 210 | 443 | 208 | a car suspension control arm with rubber bushings | 353 | 358 | 588 | 350 | ||
| a USB stick | 193 | 193 | 378 | 193 | a truck leaf spring | 58.0 | 56.8 | 54.3 | 57.6 | ||
| an electric toothbrush | 66.7 | 68.1 | 74.3 | 65.8 | a car wheel with its rubber tyre | G | 1410 | 1460 | 3580 | 1390 | |
| a coffee mug | T | 1260 | 1270 | 1970 | 1250 | a car brake disc | S | 912 | — | — | — |
| a computer mouse | 445 | 446 | 1890 | 443 | a crankshaft | G | 299 | 309 | 552 | 296 | |
| Body-fitted | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Matched DOFs | Matched surface | Graded | ||||||||||||||
| Object | Flags | (%) | (%) | (%) | (%) | (%) | (%) | |||||||||
| a TV remote control | 2.6 | 5.1 | 0.929 | 0.948 | 0.940 | 2.8 | 5.3 | 0.925 | 0.942 | 0.933 | 2.4 | 4.8 | 0.934 | 0.950 | 0.949 | |
| a USB stick | 0.43 | 2.0 | 0.938 | 0.965 | 0.924 | 0.49 | 2.1 | 0.934 | 0.963 | 0.915 | 0.33 | 1.9 | 0.949 | 0.972 | 0.931 | |
| an electric toothbrush | 6.1 | 10 | 1.091 | 0.950 | 1.014 | 5.2 | 8.5 | 1.077 | 0.943 | 1.025 | 2.9 | 4.9 | 1.042 | 0.942 | 0.977 | |
| a coffee mug | T | 1.7 | 4.3 | 0.943 | 0.954 | 0.937 | 2.0 | 4.7 | 0.938 | 0.951 | 0.933 | 1.8 | 4.3 | 0.944 | 0.952 | 0.938 |
| Body-fitted | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Diffuse Nitsche | Matched DOFs | Matched surface | Graded | |||||||||||||||||
| Object | Flags | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) | Mesh retries | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) | Mesh retries | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) | Mesh retries | Solver retries | Prep. (s) | Solve to (s) | Solve to (s) |
| a TV remote control | 0 | 1.15 | 2.66 | 2.66 | 0 | 0 | 8.74 | 2.63 | 1.96 | 0 | 0 | 17.2 | 5.58 | 4.07 | 0 | 0 | 9.77 | 2.56 | 1.90 | |
| a USB stick | 0 | 1.08 | 3.97 | 2.02 | 0 | 0 | 8.01 | 2.69 | 1.91 | 0 | 0 | 15.0 | 6.96 | 3.75 | 0 | 0 | 9.17 | 3.44 | 1.87 | |
| an electric toothbrush | 0 | 0.505 | 3.22 | 2.17 | 0 | 0 | 4.29 | 5.26 | 3.62 | 0 | 0 | 4.49 | 4.53 | 3.17 | 0 | 0 | 4.68 | 9.73 | 8.05 | |
| a coffee mug | T | 0 | 6.25 | 29.8 | 22.1 | 0 | 0 | 73.0 | 24.4 | 17.5 | 0 | 0 | 77.4 | 127 C | 114 C | 0 | 0 | 80.1 | 23.8 | 16.9 |