Hi,
for certain polygons the AppCSXCAD is showing a weird artifact - it looks like some vertices are missing.
From the openEMS --debug-PEC dump it seems like openEMS is seeing the correct polygon - just the AppCSXCAD is visualizing it incorrectly.
Maybe related to this http://openems.de/forum/viewtopic.php?f=3&t=444 ?
Should look like this:

AppCSXCAD shows this:

openEMS PEC dump (white) with AppCSXCAD .stl export (blue) for comparison:

I have minimized the test-case into this script:
close all
clear
clc
FDTD = InitFDTD();
CSX = InitCSX();
CSX = AddMetal(CSX, 'metal');
p(1,1) = 0.00457; p(2,1) = 0.00718;
p(1,2) = 0.00457; p(2,2) = 0.00782;
p(1,3) = 0.00492; p(2,3) = 0.00782;
p(1,4) = 0.00492; p(2,4) = 0.00768;
p(1,5) = 0.00551; p(2,5) = 0.00768;
p(1,6) = 0.00551; p(2,6) = 0.00832;
p(1,7) = 0.00492; p(2,7) = 0.00832;
p(1,8) = 0.00492; p(2,8) = 0.00818;
p(1,9) = 0.00457; p(2,9) = 0.00818;
p(1,10) = 0.00457; p(2,10) = 0.00882;
p(1,11) = 0.00398; p(2,11) = 0.00882;
p(1,12) = 0.00398; p(2,12) = 0.00718;
CSX = AddPolygon( CSX, 'metal', 200, 2, 0.00018001, p);
mesh.x = 0:10e-3;
mesh.y = 0:10e-3;
mesh.z = 0:30e-3;
CSX = DefineRectGrid(CSX, 1, mesh);
WriteOpenEMS('model.xml', FDTD, CSX);
CSXGeomPlot('model.xml');
Generated .xml and the script:
appcsxcad_testcase.zip
openEMS version:
----------------------------------------------------------------------
| openEMS 64bit -- version v0.0.35-63-gba793ac
| (C) 2010-2018 Thorsten Liebig <thorsten.liebig@gmx.de> GPL license
----------------------------------------------------------------------
Used external libraries:
CSXCAD -- Version: v0.6.2-93-gef6e409
hdf5 -- Version: 1.10.5
compiled against: HDF5 library version: 1.10.5
tinyxml -- compiled against: 2.6.2
fparser
boost -- compiled against: 1_72
vtk -- Version: 8.2.0
compiled against: 8.2.0
Hi,
for certain polygons the AppCSXCAD is showing a weird artifact - it looks like some vertices are missing.
From the
openEMS --debug-PECdump it seems like openEMS is seeing the correct polygon - just the AppCSXCAD is visualizing it incorrectly.Maybe related to this http://openems.de/forum/viewtopic.php?f=3&t=444 ?
Should look like this:

AppCSXCAD shows this:

openEMS PEC dump (white) with AppCSXCAD .stl export (blue) for comparison:

I have minimized the test-case into this script:
Generated .xml and the script:
appcsxcad_testcase.zip
openEMS version: