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
metal = Layer(10, 0) # Metal routing layer
text = Layer(100) # Text annotations (datatype defaults to 0)Layer objects are hashable and can be used as dictionary keys or in sets.
Attributes
attributenumberintGDS layer number (0--999).
attributedatatypeintGDS datatype (0--999). 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 0paramnumberintGDS layer number.
paramdatatypeint= 0GDS datatype. Defaults to 0.
Returns
None