Skip to content

Straight

straight

Provides straight waveguides in dbu and um versions.

A waveguide is a rectangle of material with excludes and/or slab around it::

┌─────────────────────────────┐
│        Slab/Exclude         │
├─────────────────────────────┤
│                             │
│            Core             │
│                             │
├─────────────────────────────┤
│        Slab/Exclude         │
└─────────────────────────────┘

The slabs and excludes can be given in the form of an Enclosure.

straight

straight(
    width: um,
    length: um,
    layer: LayerInfo,
    enclosure: LayerEnclosure | None = None,
) -> KCell

Straight waveguide in um.

Visualization::

┌─────────────────────────────┐
│        Slab/Exclude         │
├─────────────────────────────┤
│                             │
│            Core             │
│                             │
├─────────────────────────────┤
│        Slab/Exclude         │
└─────────────────────────────┘

Parameters:

Name Type Description Default
width um

Width of the straight. [um]

required
length um

Length of the straight. [um]

required
layer LayerInfo

Main layer of the straight.

required
enclosure LayerEnclosure | None

Definition of slabs/excludes. [um]

None
Source code in kfactory/cells/straight.py
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
def straight(
    width: um,
    length: um,
    layer: kdb.LayerInfo,
    enclosure: LayerEnclosure | None = None,
) -> KCell:
    """Straight waveguide in um.

    Visualization::

        ┌─────────────────────────────┐
        │        Slab/Exclude         │
        ├─────────────────────────────┤
        │                             │
        │            Core             │
        │                             │
        ├─────────────────────────────┤
        │        Slab/Exclude         │
        └─────────────────────────────┘

    Args:
        width: Width of the straight. [um]
        length: Length of the straight. [um]
        layer: Main layer of the straight.
        enclosure: Definition of slabs/excludes. [um]
    """
    return straight_dbu(
        width=demo.to_dbu(width),
        length=demo.to_dbu(length),
        layer=layer,
        enclosure=enclosure,
    )