layer name = expr binds a name. input reads from the current design (after source), optionally from a second GDS once that binding is available.
Available · yields polygons
layer m1 = input(68)
All shapes on GDS layer n, datatype 0, after flatten into source. Overlapping polygons are merged on read (union plus a vertex stitch).
An empty layer is an empty list, not a null shape. Texts on the layer are invisible without texts(...). Paths and boxes in the layout become polygons. Hierarchy: instance transform (shift, mirror, angle) is already applied to the points.
Available · yields polygons
layer via = input(70, 20)
Layer n, datatype d. Other datatypes on the same number are a different layer.
input(70) is not the union of all datatypes 70/* — only datatype 0. A negative n or d is just another index and is usually empty.
Available · yields polygons
layer raw = input(68, 20).raw
Like input, but without merge. Overlapping and kissing shapes stay separate polygons. Important for inside on raw shapes and for count.
Two identical stacked boxes: raw counts two, merged counts one. Only a shared corner: merged stitches one polygon; raw keeps two. Checks on raw measure the edges of each shape — self-space between copies is possible.
Available · yields polygons
layer b_m1 = input(1, 0, from=other)
Reads from the layout bound with gds other = …. Flatten and cells of the host apply; the main clip window does not.
An unknown from= is a runtime error. The file is resolved relative to the deck baseDir.