Relative placement of objects IΒΆ

Learning targets

  • Relative and global placement of geometrical objects

  • Alignment of object ports

This example shows how to construct an optical coupler based on two rip waveguides.

_images/ex2d_relative_alignment_mesh.png

The substrate consists of three layers which are aligned on top of each other. The rips are relatively aligned to the port North (upper center) of the top layer with a displacement to the left and right respectively.

.jcm Input File

  • layout.jcm [ASCII]

     1Layout2D {
     2  Name = "TutorialExample2D"
     3  UnitOfLength = 1e-06
     4  
     5  MeshOptions {
     6    MaximumSideLength = 1
     7  }
     8  Objects {  
     9    Parallelogram { 
    10      Priority = ComputationalDomain
    11      DomainId = 1
    12      BoundingBox {
    13        Offset = [0 0 0 1]
    14      }
    15    }
    16    
    17    Parallelogram { 
    18      Name = "Layer1"
    19      DomainId = 2
    20      Height = 1
    21      Width = 10
    22      Port = South
    23    }
    24    Parallelogram { 
    25      Name = "Layer2"
    26      DomainId = 3
    27      Height = 1
    28      Width = 10
    29      Alignment {
    30        Parent {
    31          Domain = "Layer1"
    32          Port = North
    33        }
    34        Orientation = AntiParallel
    35      }
    36    }
    37    Parallelogram { 
    38      Name = "Layer3"
    39      DomainId = 4
    40      Height = 0.5
    41      Width = 10
    42      Alignment {
    43        Parent {
    44          Domain = "Layer2"
    45          Port = North
    46        }
    47        Orientation = AntiParallel
    48      }
    49    }
    50    
    51    Trapezoid {
    52      Name = "RipLeft"
    53      DomainId = 5
    54      Height = 2
    55      Width = 3
    56      InnerAngles = [80 80]
    57      Port = South
    58      Alignment {
    59        Parent {
    60          Domain = "Layer3"
    61          Port = North
    62        }
    63        Orientation = AntiParallel
    64        Displacement = [-2 0]
    65      }   
    66    }
    67    
    68    Trapezoid {
    69      Name = "RipRight"
    70      DomainId = 5
    71      Height = 2
    72      Width = 3
    73      InnerAngles = [80 80]
    74      Port = South
    75      Alignment {
    76        Parent {
    77          Domain = "Layer3"
    78          Port = North
    79        }
    80        Orientation = AntiParallel
    81        Displacement = [2 0]
    82      }   
    83    }
    84  }
    85}