gdsfactory.cross_section.cross_section

Contents

gdsfactory.cross_section.cross_section#

gdsfactory.cross_section.cross_section(width=0.5, offset=0, layer='WG', sections=None, port_names=('o1', 'o2'), port_types=('optical', 'optical'), bbox_layers=None, bbox_offsets=None, cladding_layers=None, cladding_offsets=None, cladding_simplify=None, cladding_centers=None, radius=10.0, radius_min=None, main_section_name='_default')[source]#

Return CrossSection.

Parameters:
  • width (float) – main Section width (um).

  • offset (float) – main Section center offset (um).

  • layer (tuple[int, int] | str | int | LayerEnum) – main section layer.

  • sections (tuple[Section, ...] | None) – list of Sections(width, offset, layer, ports).

  • port_names (tuple[str, str]) – for input and output (‘o1’, ‘o2’).

  • port_types (tuple[str, str]) – for input and output: electrical, optical, vertical_te …

  • bbox_layers (Sequence[tuple[int, int] | str | int | LayerEnum] | None) – list of layers bounding boxes to extrude.

  • bbox_offsets (Sequence[float] | None) – list of offset from bounding box edge.

  • cladding_layers (Sequence[tuple[int, int] | str | int | LayerEnum] | None) – list of layers to extrude.

  • cladding_offsets (Sequence[float] | None) – list of offset from main Section edge.

  • cladding_simplify (Sequence[float] | None) – Optional Tolerance value for the simplification algorithm. All points that can be removed without changing the resulting. polygon by more than the value listed here will be removed.

  • cladding_centers (Sequence[float] | None) – center offset for each cladding layer. Defaults to 0.

  • radius (float | None) – routing bend radius (um).

  • radius_min (float | None) – min acceptable bend radius.

  • main_section_name (str) – name of the main section. Defaults to _default

Return type:

CrossSection

import gdsfactory as gf

xs = gf.cross_section.cross_section(width=0.5, offset=0, layer='WG')
p = gf.path.arc(radius=10, angle=45)
c = p.extrude(xs)
c.plot()

(Source code, png, hires.png, pdf)

../_images/gdsfactory-cross_section-cross_section-1.png
   ┌────────────────────────────────────────────────────────────┐
   │                                                            │
   │                                                            │
   │                   boox_layer                               │
   │                                                            │
   │         ┌──────────────────────────────────────┐           │
   │         │                            ▲         │bbox_offset│
   │         │                            │         ├──────────►│
   │         │           cladding_offset  │         │           │
   │         │                            │         │           │
   │         ├─────────────────────────▲──┴─────────┤           │
   │         │                         │            │           │
─ ─┤         │           core   width  │            │           ├─ ─ center
   │         │                         │            │           │
   │         ├─────────────────────────▼────────────┤           │
   │         │                                      │           │
   │         │                                      │           │
   │         │                                      │           │
   │         │                                      │           │
   │         └──────────────────────────────────────┘           │
   │                                                            │
   │                                                            │
   │                                                            │
   └────────────────────────────────────────────────────────────┘