LayerSpec

class photonforge.LayerSpec(layer, description, color=None, pattern='', *, conductive=False, device_marker=False)

Layer specification.

This class is mainly used to create layers for a Technology.

Parameters:
  • layer (tuple[int, int]) – Sequence of 2 integers describing layer and datatype (or texttype) numbers.

  • description (str) – Layer description.

  • color (str | tuple[int, int, int] | tuple[int, int, int, int] | None) – Layer display color. It can be a string of hexadecimal values in the formats ‘RGBA’ or ‘RRGGBBAA’ (with an optional ‘#’ prefix), or a tuple with 3 or 4 non-negative integers for each component. A random color based on layer will be used if set to None. A random variation of a basic color can also be used by when set to ‘red’, ‘orange’, ‘yellow’, ‘green’, ‘cyan’, ‘blue’, ‘purple’, ‘magenta’, ‘gray’, or ‘grey’.

  • pattern (str) – Hatch pattern used to display the layer. Must be one of ‘solid’, ‘hollow’, ‘\’, ‘\\’, ‘/’, ‘//’, ‘-’, ‘=’, ‘x’, ‘xx’, ‘+’, ‘++’, ‘.’, ‘:’, or “” (random selection).

  • conductive (bool) – Whether the layer carries electrical current.

  • device_marker (bool) – Whether geometry on the layer marks regions to remove from electrical conductors during connectivity extraction.

Example

>>> layer_spec = pf.LayerSpec((1, 0), "Silicon layer", "blue", "//")

See also

Layers guide

Methods

copy()

Create a copy of this layer specification.

Attributes

color

Layer display color.

conductive

Whether the layer carries electrical current.

description

LayerSpec description.

device_marker

Whether the layer marks regions to remove from electrical conductors.

layer

Layer and datatype tuple.

pattern

Layer display pattern.

properties

Object properties.

color

Layer display color.

Type:

ndarray

conductive

Whether the layer carries electrical current.

Type:

bool

copy()

Create a copy of this layer specification.

Returns:

New copy.

Return type:

LayerSpec

description

LayerSpec description.

Type:

str

device_marker

Whether the layer marks regions to remove from electrical conductors.

Type:

bool

layer

Layer and datatype tuple.

Type:

tuple[int, int]

pattern

Layer display pattern.

Type:

str

properties

Object properties.

Type:

Properties