parametric.straight
straight( *, port_spec: Annotated[str | photonforge.PortSpec, _] | None = None, length: Annotated[float, exclusiveMinimum=0, units='μm'] | None = None, endpoint: Annotated[ collections.abc.Sequence[Annotated[float, units='μm']], maxItems=2, minItems=2, ] | None = None, bulge_width: Annotated[float, units='μm'] | None = None, bulge_taper_length: Annotated[float, minimum=0, units='μm'] | None = None, bulge_margin: Annotated[float, minimum=0, units='μm'] | None = None, technology: photonforge.Technology | None = None, name: str | None = None, model: photonforge.Model | None = None,) -> photonforge.ComponentStraight waveguide section.
Args
- port_spec: Port specification describing waveguide cross-section.
- length: Section length. Mutually exclusive with
endpoint. - endpoint: Section endpoint relative to the start, building a waveguide at an arbitrary angle with ports placed exactly at both ends. Mutually exclusive with
length. - bulge_width: Width added to the waveguide cross-section in the central region when
lengthif enough to fit in 2 tapering sections plus margins. IfNone, defaults to 0. - bulge_taper_length: Length of each tapering region for bulging the central region of the waveguide. If
None, defaults to 0. - bulge_margin: Length of the waveguide that must be kept without bulging at both ends. If
None, defaults to 0. - technology: Component technology. If
None, the default technology is used. - name: Component name.
- model: Model to be used with this component. If
NoneaWaveguideModelis used.
Returns
Component with the straight section, ports and model.
Example
>>> component1 = pf.parametric.straight(port_spec="Rib", length=10)>>> component2 = pf.parametric.straight(... port_spec="Strip",... length=12,... bulge_width=0.4,... bulge_taper_length=3,... bulge_margin=1,... )>>> layout = pf.Component().add(... pf.Reference(component1), pf.Reference(component2, (0, -4))... )