parametric.extend_ports
extend_ports( *, component: photonforge.Component | None = None, length: Annotated[float, exclusiveMinimum=0, units='μm'] | None = None, new_port_spec: Annotated[str | photonforge.PortSpec, _] | None = None, component_ports: collections.abc.Sequence[str | photonforge.PortSpec] | None = None, name: str | None = None, model: photonforge.Model | None = None, straight_kwargs: Annotated[dict[str, Any], _] | None = None, transition_kwargs: Annotated[dict[str, Any], _] | None = None,) -> photonforge.ComponentExtend component ports, optionally changing their specifications.
Args
- component: Component to be connected.
- length: Positive extension length. Section keyword arguments can override this length.
- new_port_spec: Replacement specification for extended ports. If not provided or configured, keep each original specification.
- component_ports: Names or port specifications to identify which waveguide ports in the component should be extended. If
Noneor empty, extend all waveguide ports. Other ports and terminals are preserved. - name: Resulting component name.
- model: Model for the resulting component. If
None, use aCircuitModel. - straight_kwargs: Dictionary of keyword arguments for
straight. - transition_kwargs: Dictionary of keyword arguments for
transition.
Returns
Component with extensions and the original interface names.