Skip to article frontmatterSkip to article content

gdsfactory.path.transition

gdsfactory.path.transition(cross_section1: CrossSection | str | dict[str, Any] | Callable[[...], CrossSection] | SymmetricalCrossSection | DCrossSection, cross_section2: CrossSection | str | dict[str, Any] | Callable[[...], CrossSection] | SymmetricalCrossSection | DCrossSection, width_type: Literal['sine', 'linear', 'parabolic'] | Callable[[float, float, float], float] = 'sine', offset_type: Literal['sine', 'linear', 'parabolic'] | Callable[[float, float, float], float] = 'sine')Transition

Returns a smoothly-transitioning between two CrossSections.

Only cross-sectional elements that have the name (as in X.add(…, name = ‘wg’) ) parameter specified in both input CrosSections will be created. Port names will be cloned from the input CrossSections in reverse.

Parameters
  • cross_section1First CrossSection.

  • cross_section2Second CrossSection.

  • width_type‘sine’, ‘parabolic’, ‘linear’ or Callable. type of width transition used if any widths are different between the two input CrossSections.

  • offset_type‘sine’, ‘parabolic’, ‘linear’ or Callable. type of width transition used if any widths are different between the two input CrossSections.