Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

FDTD: Scripting command polyor, polydiff, polyxor, etc. do not work

    • Theo Hannotte
      Subscriber

      I am trying to pattern the surface of a parabola with the "etch" material.

      To create the etch mask object, I start with a square, and use the function polydiff to remove the pattern.

      This works well when the pattern is a simple polygon fully included in the square.

      However, when I try to remove 2 polygons that are touching or overlapping, the function returns 0.

      I tried to combine the 2 polygons with "polyor" before the substraction, but "polyor" also return 0.

      To give a concrete example, I have here defined the vertices for 2  orthogonal rectangles that would form a cross if combined:

      bridge1 = [ -G2, bridgeW2;
                  G2, bridgeW2;
                  G2, -bridgeW2;
                  -G2, -bridgeW2];
      bridge2 = [ bridgeW2, -G2;
                  bridgeW2, G2;
                  -bridgeW2, G2;
                  -bridgeW2, -G2];

      Although this seems to be a simple case, every single boolean function (polyor, polyand, polydiff and polyxor) simply return 0 without a warning.

      Is there additional condition on the polygon that are not mentionned in the documentation?
      And if those operator really are unable to deal with those shape, what would be a better way to pattern my parabola without calculating every intersection points manually?

       

    • Amrita Pati
      Ansys Employee

      Hi Theo,

      This seems very simple and I am surprised that it is not working. Let me run some tests and get back to you.

      Regards,
      Amrita

    • 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

    • Theo Hannotte
      Subscriber

      Hi Amrita,

       

      Thank you very much for your answer, the same correction solved all the other combinations in my structure.

       

      Regards,

      Théo

Viewing 3 reply threads
  • The topic ‘FDTD: Scripting command polyor, polydiff, polyxor, etc. do not work’ is closed to new replies.