Polygons are broken in some cases, can be fixed by adding 0.01 to coordinates. #207
Replies: 3 comments 1 reply
-
Hi @georgy-moshkin, Have you tried to round your coordinates to 5 or 6 decimal places? I had a problem similar to this. In my cased it seemed like decimal truncation when building the polygon caused some points to fall on-top of each other/get too close to each other. Rounding to 6 decimal places fixed the problem. Good luck! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions. In my case, I fixed it by adding "pp=0;" in the end of the loop:
I think this destroys 2-dimensional pp(i,k) array, so it can be recreated from the scratch on each iteration. |
Beta Was this translation helpful? Give feedback.
-
I think this is only a glitch in the visualization by AppCSXCAD? I think this is a bug in QCSXCAD and not in CSXCAD or openEMS. But I would need to confirm that... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I can't understand why this is happening. Maybe there is some error in my code, but I do not see it. Here is how problem looks like:

But after replacing pp(2,16) = 0; with pp(2,16) = 0.01; it looks normal.
`
for s = 0:patch.N-1
pp(1,1) = 0; pp(2,1) = 0;
pp(1,2) = 0; pp(2,2) = len180/2-feed.width*3/2;
endfor
`
Beta Was this translation helpful? Give feedback.
All reactions