laylight tour
0/31
4/6

Shape operations · 4 of 6

Growing and shrinking

With a length on the right, + and - grow and shrink a shape instead of combining shapes:

shape core + 2um as wider      # dilation: every edge moves 2um outwards
shape core - 200nm as narrower # erosion: every edge moves 200nm inwards

Growing rounds nothing off by itself: corners stay sharp (they are mitered). After the expression, a join chooses the corners: "miter" (the default), "round" for circular arcs, or "bevel" to cut them straight:

shape core + 2um, "round" as halo

Derived shapes replace their operands only on their own layer. A shape on another layer can grow from a waveguide without removing it, which is how claddings and exclusion zones are drawn:

layer slab {
    shape core + 2um as cladding   # core stays on si
}

Exercise

Add a cladding on the slab layer that reaches 3 µm around the waveguide core, with round corners, and name it clad. The core must stay on si.

loading compiler…

Edit the code, watch the layout, then press Submit to check your solution against the exercise.

Compiling…