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=7.0, main_section_name='_default')[source]#

Return CrossSection.

Parameters:
  • width (float | Callable[[...], ndarray[tuple[Any, ...], dtype[floating[Any]]]]) – main Section width (um) or parameterized function from 0 to 1.

  • offset (float | Callable[[float], float]) – main Section center offset (um) or parameterized function from 0 to 1.

  • 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 (float | Sequence[float] | None) – offset from main Section edge. Single float is broadcast to all cladding layers.

  • cladding_simplify (float | 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. Single float is broadcast to all cladding layers.

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

  • 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
   │         │                         │            │           │
   │         ├─────────────────────────▼────────────┤           │
   │         │                                      │           │
   │         │                                      │           │
   │         │                                      │           │
   │         │                                      │           │
   │         └──────────────────────────────────────┘           │
   │                                                            │
   │                                                            │
   │                                                            │
   └────────────────────────────────────────────────────────────┘