P·12 · Mechanical
Instrument Enclosure DFM and a CAD-to-FEA Pipeline
A 500+ lb instrument enclosure moved from thick aluminum to sheet metal with modal FEA, cutting lead time from 8 to 2.5 weeks, plus a CAD-to-FEA prep tool.
At a glance
- 8 → 2.5 wkenclosure lead time
- 174 → 86bodies after automated cleanup: 88 fasteners and seals removed, every part named
- ~8 sheadless cleanup run, down from hand-editing in a CAD GUI
- Where
- QT Sense
- Role
- Mechatronics intern, enclosure redesign lead
- Timeline
- May 2026 to present
- Status
- Confidential
- ANSYS Mechanical
- Static structural FEA
- Modal analysis
- Design for manufacturing (DFM)
- Onshape
- Python
- OpenCASCADE (OCP)
- gmsh
- STEP AP242
This is active work at QT Sense. The enclosure design and its dimensions are confidential, so this page has no drawings or photos. The analysis tool I wrote is shareable, and it makes up most of the detail below. Other QT Sense work: the filter changer and liquid handling.
The problem
QT Sense’s Quantum Nuova is a quantum-sensing instrument that uses fluorescent nanodiamond sensors to measure stress in living cells in real time. Its enclosure weighs more than 500 lb.
The original enclosure was built from thick aluminum, chosen so vibration would not disturb the optical system. It was hard to manufacture, and the lead time was 8 weeks.
Approach
Working with the manufacturer, I changed the enclosure from thick aluminum to sheet-metal plates, which cut the lead time to 2.5 weeks.
That change moved the structure’s resonant frequencies, and the optics are sensitive to vibration. So the redesign added intentional damping and vibration mounts, and I ran extensive modal analysis to show that the new natural frequencies stay clear of the frequencies that would disturb the optics.
Getting the FEA to run at all was its own problem. That is where the tool below came from.
Engineering detail: making the CAD meshable
A fabricated assembly exported from CAD is almost never ready to mesh. This one had four problems:
| Problem in the raw STEP export | What it does to the FEA |
|---|---|
| 174 bodies, 88 of them fasteners and seals | each fastener creates tiny contacts and sliver features, and the element count explodes |
| sliver edges down to about 5 µm | the mesher is forced into microscopic elements or stalls |
| parts held together only by the bolts you delete | the sub-assemblies float, giving spurious 0 Hz modes and a singular stiffness matrix |
| thin sheet-metal walls on long parts | a solid tetrahedral mesh needs elements smaller than the wall, so it runs out of memory |
Cleaning that up by hand in a CAD GUI is slow, can’t be repeated exactly, and leaves no record of what changed. So I wrote step_prep.py, a headless Python pipeline on the OpenCASCADE geometry kernel (through the OCP bindings). Given a raw STEP assembly it:
- reads it with part names preserved;
- inventories the geometry and counts sliver edges;
- deletes non-structural hardware by name rule;
- optionally merges coplanar faces;
- diagnoses how the remaining parts actually connect;
- optionally fuses near-touching parts, under a wall-thickness safety limit;
- writes a clean, named multibody STEP (AP242);
- proves every face surface-meshes, using gmsh.
Decisions and what I rejected
- Rules over machine learning for deleting parts. A solid is deleted if its name matches a drop keyword (screw, nut, washer, gasket and so on) and no keep keyword (plate, mount, bracket). The keep list stops a load-bearing welded “screw plate” from being dropped with the screws. Every deletion traces back to a keyword, which matters more for a defensible analysis than cleverness.
- Keep parts separate. Fusing everything into one body is easiest to mesh, but it erases per-part materials and corrupts mass on thin walls. I keep parts separate by default and leave the connections to contact definitions in ANSYS.
- Exact identity for part names. Each placed solid is matched back to its part name by shared underlying geometry, which is exact even for mirror-image parts with identical volumes. Matching by volume would confuse them.
- OpenCASCADE for writing, gmsh only for checking. My first version used gmsh for everything, and its STEP writer crashed with a null-pointer access violation on the healed geometry. I moved all geometry authoring and export to OpenCASCADE, whose writer handled the same shapes cleanly, and kept gmsh for the mesh check.
The diagnostic that explained the modal results
An exact Boolean union of the 86 structural parts showed they form 10 separately connected clusters, with gaps of 0.017 to 0.5 mm between them. Once the fasteners are removed, nine of those clusters float, and each adds six rigid-body modes. That one number predicts the “first modes at 0 Hz” failure before ANSYS ever runs. It also says a bonded-contact pinball radius of about 1 mm will close every gap.
The wall-safety limit
Fusing near-touching parts with a loose tolerance is dangerous on sheet metal. On this model, a 0.5 mm fuse tolerance collapsed thin walls and destroyed about 13% of the mass. The tool now estimates the thinnest wall in the model and clamps the fuse tolerance to a quarter of it. At that limit, numerical gaps close with 0% mass change, and the tool reports the mass change so any distortion is visible.
Results
- Enclosure lead time cut from 8 weeks to 2.5 weeks.
- On the enclosure model, the tool went from 174 bodies to 86 named structural solids and roughly halved the face count (9,350 to 4,583) in about 8 seconds.
- All 4,387 faces of the simplified model surface-meshed with zero failures.
The tool’s limits: its keyword lists are specific to this product family and need review for a new one, and it prepares geometry but does not mesh or solve. Interferences between bodies are reported, not fixed automatically.
My contribution
I led the enclosure redesign with the manufacturer, ran the modal analysis, and wrote the geometry-prep tool alone.