gdsfactory.cross_section.cross_section#
- gdsfactory.cross_section.cross_section(width: float = 0.5, offset: float = 0, layer: tuple[int, int] | str | int | LayerEnum = 'WG', sections: tuple[Section, ...] | None = None, port_names: tuple[str, str] = ('o1', 'o2'), port_types: tuple[str, str] = ('optical', 'optical'), bbox_layers: Sequence[tuple[int, int] | str | int | LayerEnum] | None = None, bbox_offsets: Sequence[float] | None = None, cladding_layers: Sequence[tuple[int, int] | str | int | LayerEnum] | None = None, cladding_offsets: Sequence[float] | None = None, cladding_simplify: Sequence[float] | None = None, cladding_centers: Sequence[float] | None = None, radius: float | None = 10.0, radius_min: float | None = None, main_section_name: str = '_default') CrossSection [source]#
Return CrossSection.
- Parameters:
width – main Section width (um).
offset – main Section center offset (um).
layer – main section layer.
sections – list of Sections(width, offset, layer, ports).
port_names – for input and output (‘o1’, ‘o2’).
port_types – for input and output: electrical, optical, vertical_te …
bbox_layers – list of layers bounding boxes to extrude.
bbox_offsets – list of offset from bounding box edge.
cladding_layers – list of layers to extrude.
cladding_offsets – list of offset from main Section edge.
cladding_simplify – 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 – center offset for each cladding layer. Defaults to 0.
radius – routing bend radius (um).
radius_min – min acceptable bend radius.
main_section_name – name of the main section. Defaults to _default
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
)┌────────────────────────────────────────────────────────────┐ │ │ │ │ │ boox_layer │ │ │ │ ┌──────────────────────────────────────┐ │ │ │ ▲ │bbox_offset│ │ │ │ ├──────────►│ │ │ cladding_offset │ │ │ │ │ │ │ │ │ ├─────────────────────────▲──┴─────────┤ │ │ │ │ │ │ ─ ─┤ │ core width │ │ ├─ ─ center │ │ │ │ │ │ ├─────────────────────────▼────────────┤ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └──────────────────────────────────────┘ │ │ │ │ │ │ │ └────────────────────────────────────────────────────────────┘