Layer
GDS layer identity defined by a (number, datatype) pair.
Every polygon, path, and text element in a GDS file belongs to a layer.
Layer encodes the two integers that GDS uses to identify layers: a layer
number and a datatype. By convention, datatype defaults to 0.
silicon = Layer(1, 0) # Silicon waveguide layer
cladding = Layer(2, 0) # Cladding layer
text = Layer(10) # Text annotations (datatype defaults to 0)Layer objects are hashable and can be used as dictionary keys or in sets.
Attributes
attributenumberintLayer number (0--65535). GDS export supports values through 32767.
attributedatatypeintDatatype (0--65535). GDS export supports values through 32767. Defaults to 0.
Methods
func__init__(number, datatype=0) -> NoneCreate a new Layer.
Example
Layer(1, 0) # Explicit number and datatype
Layer(1) # Equivalent: datatype defaults to 0paramnumberintLayer number. Values above 32767 cannot be exported to GDS.
paramdatatypeint= 0Datatype. Values above 32767 cannot be exported to GDS. Defaults to 0.
Returns
None