shape has NaN vertices when adding new shapes to the aggregate shape encloses a void; error assigning shape to antenna

3 views (last 30 days)
I am creating a PCB antenna pattern adding together copper Polygons and rectangles to make the PCB trace pattern. The copper traces short back on themself forming a region with voids in it.
I have used shape.Rectangle() and shape.Polygon() to create the elements and added them together.
When I show the copper it looks right (needs a little cleanup, but OK).
When I show or mesh the antenna it throws a triangulation error.
Adding the last rectangle that closes the shape causes an NaN. This error was NOT happening in another pattern (make a shape, remove a notch from an edge, bridge the notch with a rectangle...).
...
copper = shape.Polygon('Vertices', 0.001*[MinX MinY 0; MinX MaxY 0; MaxX MaxY 0; MaxX MinY 0]);
stem = shape.Rectangle ("Center", 0.001*[StemX MaxY+StemLen/2], 'Length', 0.001*StemWid, 'Width', 0.001*StemLen);
copper = copper + stem;
... add rectangles till a closed loop is formed. feed point in stem and loading reactance at far end...
...
show(copper); % looks OK other than jagged corners, see below
Ant = customAntenna ('Shape', copper, 'Load', Load);
show(Ant); % --> error. If commented, mesh(Ant, ...) throws similar error (same error, different call back path)
createFeed (Ant, FeedPoint, 1);
meshconfig (Ant, 'manual');
mesh(Ant, 'MaxEdgeLength', .06,'MinEdgeLength', 0.0005);
show(Ant) --> error
Error using triangulation
The coordinates of the input points must be finite values; Inf and NaN are not permitted.
Error in customAntenna/createGeometry (line 235)
tri = triangulation(tt.ConnectivityList,vert);
Error in em.MeshGeometry/protectedshow
Error in em.MeshGeometryAnalysis/show (line 31)
protectedshow(obj,varargin{:});
mesh(Ant, 'MaxEdgeLength', .06,'MinEdgeLength', 0.0005); --> error
Error using triangulation
The coordinates of the input points must be finite values; Inf and NaN are not permitted.
Error in customAntenna/createGeometry (line 235)
tri = triangulation(tt.ConnectivityList,vert);
Error in customAntenna/meshGenerator (line 306)
createGeometry(obj);
Error in em.MeshGeometry/updateMesh
Error in em.MeshGeometry/protectedmesh
Error in em.MeshGeometryAnalysis/mesh (line 66)
protectedmesh(obj,varargin{:});
Error in patchNotch (line 89)
mesh(Ant, 'MaxEdgeLength', .06,'MinEdgeLength', 0.0005);
  4 Comments
Jeffrey Andle
Jeffrey Andle on 28 Aug 2024
I reverted to just testing a transmission line 0.1mm over GND, 0.16mm wide, 100mm long.
I intend a feed at +X and a 50 Ohm load through a via at -X. The line is shorted with the via and open when I comment it, so I guess via and feed are working, but the load is not.
close all
clear
freq = linspace(100e6, 1000e6, 10);
% test simple transmission line 150mm long
% via, load, line, feed, via
ant = pcbStack();
ant.BoardShape = antenna.Rectangle("Length", 0.15, "Width", 0.075);
ant.BoardThickness = 0.0001;
L1 = antenna.Rectangle("Length", 0.1, "Width", 0.00016);
L2 = dielectric("FR4");
L2.EpsilonR= 4.1;
L2.Thickness=ant.BoardThickness;
L3 = ant.BoardShape;
ant.Layers = {L1 L2 L3};
ant.FeedDiameter = 0.00005;
ant.FeedLocations = [0.0498 0 1 3];
ant.ViaDiameter = 0.00005;
ant.ViaLocations = [-0.0498 0 1 3];% ; 0.0498 0 1 3];
Load = [lumpedElement('Impedance', 50, 'Location', [-0.0496 0 ant.BoardThickness])]; % lumpedElement('Impedance', 50, 'Location', [0.0496 0 ant.BoardThickness])];
ant.Load = Load;
meshconfig (Ant, 'manual');
mesh(ant, 'MaxEdgeLength', .03);
figure
Z = impedance(Ant, freq);
plot (freq, real(Z), freq, imag(Z))
grid on

Sign in to comment.

Answers (0)

Categories

Find more on 3-D Modeling, CAD Files, and Fabrication in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!