modeling problem

    • 2212296

      1.How to connect two cubes into a whole (code instructions)?

      2.How to perform symmetrical operations on graphics (code instructions)

      thank you all !

    • Guilin Sun
      Ansys Employee

      I am not sure what do you mean "connect". You can use script to modify their relative positions:


      similarly for yz.

      You can also add them into a structure group:


      Symmetry can only be performed with boundary conditions. When the device AND the source polarization have symmetry, you can apply symmetry BCs. Using

      ?getnamed("FDTD","x min bc");  to get the current x min BC. you can set it:

      setnamed("FDTD","x min bc","symmetric"); for symmetric BC

       setnamed("FDTD","x min bc","anti-symmetric"); for antisymmetric BC

      Other direction is similar.

      Please refer  Symmetric and anti-symmetric BCs in FDTD and MODE

      Please try.





      • 2212296

        Sorry, I may not have described it accurately.

        1. Connection: It is to connect individual small graphics into a whole, and then mirror the whole.
        2. 2, I mean to mirror the pattern. How to use code to achieve?
    • Guilin Sun
      Ansys Employee

      It might be able to realize.  When an object is mirrored, at least one of the coordinate (xmax,ymax and zmax) will be flipped. if so, you can rotate the object 180 deg, and shift it.

      For example, rotate am object 180deg and shift -2e-6 along x.

      setnamed("object_name","first axis","z");

      setnamed("object_name","rotation 1", 180);


      Below are triangles, the right one is the original, and the left one is rotated and shifted.


      When you say connect, do you mean add them into a group. yes, it is also doable: addstructuregroup - Script command

      There are related script. Please try. If you have question using script, please write a new post.


Viewing 2 reply threads
  • You must be logged in to reply to this topic.