MeshReader
Description
The MeshReader object stores the properties of the mesh such as
the points, triangles, and tetrahedra in the mesh, edge lengths of the triangles, growth rate,
and mesh quality. You can use this information to fine tune the mesh for your application. You
can also visualize the mesh of the metal region, dielectric region, or the entire antenna or
array structure and detect bad features in the mesh.
Creation
You can create the MeshReader object using the mesh function. There are two ways to create this object:
Run any port, surface, or field analysis on the antenna or array to automatically generate the mesh. Then use
m = mesh(object)syntax to create theMeshReaderobject.Manually mesh the antenna or array by setting
MaxEdgeLengthproperty of the mesh to create theMeshReaderobject. For example,m = mesh(object,MaxEdgeLength=0.01)creates aMeshReaderobject.
Properties
Object Functions
showDielectricSurfaceMesh | Display dielectric surface mesh of antenna or array |
showDielectricVolumeMesh | Display dielectric volume mesh of antenna or array |
showMeshAll | Display complete metal-dielectric mesh of antenna or array |
showMetalMesh | Display metal mesh of antenna or array |
showDuplicateVertices | Highlight duplicate vertices in STL file or mesh |
showFreeTriangles | Highlight free triangles in STL file or mesh |
showNonManifoldEdges | Highlight non-manifold edges in STL file or mesh |
showNonManifoldVertices | Highlight non-manifold vertices in STL file or mesh |
showNormalTransitionEdges | Highlight normal transition edges in STL file or mesh |
showSlivers | Highlight slivers in STL file or mesh |
showTVertices | Highlight T-vertices in STL file or mesh |
Examples
Tips
The MeshReader object stores the triangulation information of the mesh in the form of points and triangles
connectivity list. This allows stlFileChecker
functions to be directly used on the MeshReader object to detect and display
bad features of the mesh. For example, below code shows the detection and display of
T-Vertices in the mesh of a microstrip patch antenna operating at 1.67
GHz.
ant = patchMicrostrip(Conductor=metal("Copper"),...
Substrate=dielectric("FR4"));
impedance(ant,1.67e9);
m = mesh(ant)
detectTVertices(m);
m.TVertices
showTVertices(m)Alternatively, you can write the mesh data to a STL file using stlwrite
function and then run stlFileChecker on that STL file to detect bad features
of the mesh. For example, below code shows the detection of all the bad features in the mesh
by converting the mesh data to a STL file using stlwrite
function and running stlFileChecker on that data. Once all the bad features
are detected, you can choose individual feature to be highlighted on the mesh plot using
functions of the stlFileChecker
object.
ant = patchMicrostrip(Conductor=metal("Copper"),...
Substrate=dielectric("FR4"));
impedance(ant,1.67e9);
m = mesh(ant)
tr = triangulation(m.Triangles(1:3,:)',...
m.Points(:,1:max(unique(m.Triangles(1:3,:)))')');
stlwrite(tr,"sampleFile.stl");
stlFileChecker("sampleFile.stl")Version History
Introduced in R2023b




