In building three-dimensional finite-element solutions, the eternal hope is the faultless transfer of geometric information from CAD programs. In this scenario, mesh generation is a leisurely activity, simply a matter of clicking a few commands. Unfortunately, reality often intrudes. We live in a world where people can’t even make a universal phone charger, let alone a consistent 3D standard.
The STL capabilities of MetaMesh (for importing parts from SolidWorks, ProE,….) are quite reliable as long as the input files are valid. The nodes and sides of triangular facets must be logically connected and cover a contiguous three-dimensional surface. It’s important to realize that CAD programs don’t always generate valid STL output.
As an example, in a recent consulting project I received a faulty STL file as a part of a large assembly. Several hours evaporated while I narrowed down the cause of mesh distortions. Ironically, the part in question was simple: a cylindrical cathode with a cylindrical concavity in the emission surface (first figure below). The problem is apparent in a wireframe view of the cathode near the emission surface (second figure). The object was not originally constructed as a single part in the CAD program. Instead, a dished cap was added to a cylinder in a manner that did not preserve the logical continuity of facets. In fact, the cap doesn’t even fit correctly. Such a combination should not be represented in a single STL file. Usually MetaMesh will soldier through and create something acceptable, even with a corrupt file. In this application, the cathode surface was adjacent to a thin gap separating it from a focus electrode. Perfect fitting was essential. The obvious way to resolve the issue would be to ask the mechanical engineer to regenerate the STL file. Unfortunately, the design had evolved from multiple levels of multiple organizations through multiple CAD programs. It would have taken a historian to find the original designer.
The time had arrived to stop pushing buttons and attack the problem the old fashioned way. An inspection of standard mechanical drawings of the part showed that it could be constructed from native MetaMesh solid models. I started with a cylinder and then machined the emission surface using an extrusion with a cylindrical side and the physical properties of vacuum. Fabricating the part did involve some work:
- I had to do some trigonometry to find the vector outline of the extrusion.
- I had to do some head-scratching and sketching to figure how to rotate the extrusion into position.
- I had to think about the order for adding parts and the fitting specifications so that the trimming extrusion did not affect the focus electrode. (Note that the focus electrode was successfully represented by an STL model).
Although building the cathode from basic parts was harder, it certainly was quicker. It took less than half an hour to build the part from scratch. I cite this episode in support of some anachronistic views about computer simulations:
- It’s often better to sit in a quiet place with a paper and pencil that to pound on the computer.
- A simple approach is usually better than a sophisticated approach.
- The best way to waste time is to let the computer do all the thinking.
One lesson from the experience is that you should check the STL models when mesh generation problems occur. We have added a new STL viewer to Geometer to help in this process.
For reference, here’s the full MetaMesh specification that I created for the cathode:
PART * Make the cylinder Region: CATHODE Name: Cathode Type: Cylinder Fab: 3.1600 0.6000 Shift: 0.0000 0.0000 -23.4500 Surface Region Vacuum END PART * Machine the surface Region: EmitDef Name: SurfaceShape Type: Extrusion L 3.1600 -23.0000 3.1600 -23.3000 A 3.1600 -23.3000 0.0000 -23.6607 0.0000 -9.6387 S A 0.0000 -23.6607 -3.1600 -23.3000 0.0000 -9.6387 S L -3.1600 -23.3000 -3.1600 -23.0000 L -3.1600 -23.0000 3.1600 -23.0000 End Fab: 6.50 Rotate: 90.000 0.000 0.000 Surface Region Cathode Coat Cathode Emit END


