Ansys Learning Forum Forums Installation and Licensing Ansys Products FDTD: Scripting command polyor, polydiff, polyxor, etc. do not work Reply To: FDTD: Scripting command polyor, polydiff, polyxor, etc. do not work

Amrita Pati
Ansys Employee

Hi Theo,

I tested your scripts. The issue is that the vertices in V1 have been defined in clockwise order whereas the vertices in V2 have been defined in counter-clockwise manner. I believe, this is creating an ambiguity for the GUI. I will recommend you to use a single consistent direction. I changed the vertices of V1 to counter-clockwise, and the script seems to be working as expected:

bridgeW2 = 1;
G2 = 2;

V1 = [-G2, bridgeW2; -G2,-bridgeW2; G2,-bridgeW2; G2,bridgeW2];
V2 = [bridgeW2,-G2; bridgeW2,G2; -bridgeW2,G2; -bridgeW2, -G2];

A = polyor(V1,V2);
addpoly;
set("vertices",A);

 

Please let me know if you continue to face any issues. Also, please post your questions on the Photonics Channel, which focuses on Lumerical.

 

Regards,
Amrita