Automatic mesh types
In previous versions a solid part without a mesh setup item was always meshed with tetrahedra by Netgen. In v3.0.0 PrePoMax looks at the geometry of every part and meshes it with the most structured mesh it supports:
- a solid with 5 or 6 three- or four-sided faces (a box or a prism) gets a transfinite hexahedral mesh,
- a solid that can be swept from one set of faces to the opposite set gets a swept hexahedral mesh,
- a solid that can be turned around an axis gets a revolved mesh,
- all other solids are meshed with tetrahedra by Netgen, as before.
CAD shell parts are meshed quad-dominant by Gmsh, with structured grids on three- and four-sided faces. You do not need any mesh setup item for this; just create the mesh. A mesh setup item you define yourself is always used instead of the automatic choice, so if you want tetrahedra, add a Netgen Mesh item to the part.
Models saved with an older version are meshed as before. Their history gets a Disable default mesh types command, and the parts without a mesh setup item receive a Netgen Mesh item with their old settings. Delete that command from the history to switch the model to automatic mesh types.
Seeing the mesh types before meshing
Use View → Color Annotations → Mesh Types (or the Color by box in the toolbar) to see what each part will be meshed with before you mesh it. Parts, and shell faces one by one, are colored as Transfinite, Sweep, Revolve, Tetrahedral or Free. The colors can be changed in Settings → Colors. While this annotation is on, the Output window explains, for every solid that will get tetrahedra, why it cannot be swept, naming the surface or the cell that blocks the sweep. This is the main tool for deciding where a part should be split (see below).
Sweep meshing
The Extrude and Revolve mesh setup items were replaced by a single Sweep Mesh item; old items are converted when a file is opened. With Source surfaces = Automatic (the default) you only select the parts. PrePoMax finds the source faces and the sweep direction itself and shows them in the dialog with arrows. One item can sweep several parts; parts in a box selection that cannot be swept are skipped. The numbers of elements on connected edges are matched automatically, so the mesh stays conformal between neighboring cells. If the numbers of elements you set cannot all be satisfied, meshing stops, and Preview Edge Mesh highlights the conflicting edges and surfaces. The source faces can also be meshed with the new QuadWild quad mesher.
Compound parts, sub parts and cells
Until now, a compound part was created with Create Compound Part from several parts that touch each other. The parts are imprinted on each other, so the mesh is conformal where they meet, and each original part becomes a sub part. This still works as before.
New in v3.0.0, a single part can be divided into cells with Geometry → CAD Part → Split Solid. The part can be cut by a plane (defined by three points or by a point and a normal), by an extended face, or by an extruded edge. The dialog has a preview and an undo button. After the split, the part keeps its name in the model tree, and its pieces are listed under it as cells (Part-1_cell-1, Part-1_cell-2, …). A sub part is the part as you think of it; a cell is one solid piece of it. Selecting, hiding, coloring or renaming a sub part acts on all of its cells. The cells share their faces and nodes, so the mesh is conformal. By default, all cells of a sub part are merged into one mesh part. Set Merge cells to No in the meshing parameters to get one mesh part per cell, for example to assign different sections.
Why are cells needed? A complex solid can rarely be swept as one block, but its pieces often can. Split the part into sweepable cells, and PrePoMax sweeps each of them. Cells that still cannot be swept are filled with tetrahedra, with pyramids at the transition, and everything stays conformal. The usual workflow is: switch on the Mesh Types colors, look at the parts colored as tetrahedral, read the reason in the Output window, split, and repeat. The Split Solid dialog has a button that toggles the Mesh Types colors while you split.
Two commands work on cells, and they are easy to confuse:
- Group Cells does not change the geometry. It only collects the selected cells under one sub part, which becomes one mesh part (e.g. all cells that should be steel).
- Fuse Bodies changes the geometry. The selected cells become one solid, and the faces between them are removed. Use it to undo an unwanted cut or to remove an interior face that spoils the mesh. Fusing all cells of a part gives back a plain part.
Please note that splitting a plain part replaces it with a new compound part, so items that referred to the old part (selections, sections, loads, …) must be redefined. Split the geometry before you build the model.
To divide only faces and not the body, for example to apply a load to a part of a face, use Split Face. Fuse Faces is its inverse.
Parts with small features
A CAD part now shows an icon with an orange exclamation mark in the model tree if it has an edge shorter than 1/1000 of the part’s bounding box diagonal, or a face narrower than that (a thin strip or sliver). Such features force very small elements around them, which slows meshing and spoils the element quality. They are often left behind by imported CAD, splitting or defeaturing. When you select the part, its small edges and their vertices are highlighted. Remove them with Geometry → CAD Part → Repair (remove small faces and edges, fuse faces, join edges), using Preview to see what will be removed. Other options are Fuse Faces and Defeature Solid.
Other meshing changes
- Mesh sizes are no longer changed silently. A local element size or number of elements that conflicts with the minimum/maximum element size, or with a structured face, used to be quietly adjusted. Now meshing stops with a message that names the edges and surfaces. Older models may therefore report errors that they did not report before.
- Parallel Netgen meshing has to be switched on in Settings → Meshing → Number of threads (the default is 1). The result is the same for any number of threads. A Mesher time limit (30 min by default) stops meshers that hang.
- The Netgen Mesh item (previously Tetrahedral Netgen) now contains the Netgen settings that used to be in the meshing parameters, plus transfinite options for three- and four-sided faces.
- Open STL shells are now meshed by Netgen by default. The Mmg mesher has its own Shell Mmg mesh setup item for STL shell parts, and the Hausdorff settings moved there.
- The Grading parameter now also applies to Gmsh meshes, so fillets no longer fill a part with millions of elements.
Periodic faces are no longer split on import
A periodic face is a face that closes on itself along a single seam, such as the wall of a cylinder, a hole or a boss. Since v2.2.4, every CAD import split each periodic face into two or more faces, and every geometry operation (defeaturing, repair, compound parts, …) split it again. You reported import failures and parts that could no longer be defeatured, and the two halves of a cylinder could not be fused back into one face. The split was needed only by the sweep mesher, which now meshes such a wall around its seam.
In v3.0.0, the wall of a hole stays one face after import. If you need it split, for example to apply a load to one half of a cylinder, use Geometry → CAD Part → Split Periodic Faces and enter the number of faces. The command keeps the part’s name, id and body. Once fused, faces stay fused, and defeaturing a hole no longer has to deal with its halves.
Older files regenerate exactly as they were recorded, with the periodic faces split as before. This is controlled by Settings → General → Regenerate older files → Split periodic faces and Number of resulting faces. Note that in a new model, selections, loads or boundary conditions that relied on the halves of a cylinder must now be made on the whole face, or on faces created by Split Periodic Faces.