Skip to content

Typings

typings

dbu module-attribute

dbu = Annotated[int, 'dbu']

Integer in database units.

deg module-attribute

deg = Annotated[float, 'deg']

Float in degrees.

layer module-attribute

layer = Annotated['int | LayerEnum', 'layer']

Integer or enum index of a Layer.

rad module-attribute

rad = Annotated[float, 'rad']

Float in radians.

um module-attribute

um = Annotated[float, 'um']

Float in micrometer.

Angle

Angle = int

Integer in the range of [0,1,2,3] which are increments in 90°.

Unit

Unit = int | float

Database unit or micrometer.

KCellSpecDict

Bases: TypedDict

Specification for a KCell.

Source code in kfactory/typings.py
72
73
74
75
76
77
class KCellSpecDict(TypedDict, total=True):
    """Specification for a KCell."""

    component: str
    settings: NotRequired[dict[str, Any]]
    kcl: NotRequired[str]

MarkerConfig

Bases: TypedDict

Configure marker to send through the show function.

Attrs

color: 0xffffff type of color as int [default: None (let klayout decide)] dismissable: bool whether dismissable [default: True] dither_pattern: dither pattern to use [default: None (let klayout decide)] frame_color: 0xffffff type of color as int [default: None (let klayout decide)] halo: halo value [default: -1 (klayout default is applied)] frame_color: 0xffffff type of color as int [default: None (let klayout decide)] line_style: line style to show [default: None (let klayout decide)] line_style: line width to show [default: 1] vertex_size: size of vertices [default: 1]

Source code in kfactory/typings.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
class MarkerConfig(TypedDict, total=False):
    """Configure marker to send through the show function.

    Attrs:
        color: 0xffffff type of color as int [default: None (let klayout decide)]
        dismissable: bool whether dismissable [default: True]
        dither_pattern: dither pattern to use [default: None (let klayout decide)]
        frame_color: 0xffffff type of color as int [default: None (let klayout decide)]
        halo: halo value [default: -1 (klayout default is applied)]
        frame_color: 0xffffff type of color as int [default: None (let klayout decide)]
        line_style: line style to show [default: None (let klayout decide)]
        line_style: line width to show [default: 1]
        vertex_size: size of vertices [default: 1]
    """

    color: int | None
    dismissable: bool
    dither_pattern: int | None
    halo: int
    frame_color: int | None
    line_style: int | None
    line_width: int
    vertex_size: int