Skip to content

parametric.fill

fill(
*,
region: photonforge.Component
| photonforge.Rectangle
| photonforge.Circle
| photonforge.Polygon
| photonforge.Path
| collections.abc.Sequence[
photonforge.Rectangle
| photonforge.Circle
| photonforge.Polygon
| photonforge.Path
]
| None = None,
tile: photonforge.Component
| photonforge.Rectangle
| photonforge.Circle
| photonforge.Polygon
| photonforge.Path
| None = None,
pitch: Annotated[float, exclusiveMinimum=0, units='μm']
| Annotated[
collections.abc.Sequence[
Annotated[float, exclusiveMinimum=0, units='μm']
],
maxItems=2,
minItems=2,
]
| None = None,
fill_layer: Annotated[str | tuple[int, int], _] | None = None,
keep_out_layers: collections.abc.Sequence[
Annotated[str | tuple[int, int], _]
]
| None = None,
clearance: Annotated[float, minimum=0, units='μm'] | None = None,
boundary_clearance: Annotated[float, minimum=0, units='μm']
| None = None,
min_fraction: Annotated[float, maximum=1, minimum=0] | None = None,
technology: photonforge.Technology | None = None,
name: str | None = None,
) -> photonforge.Component

Regular array of tiles filling a region around keep-out areas.

Tiles whose bounding box clears the keep-out areas and the region boundary are placed as reference arrays. Tiles crossing them are cut to the allowed area, unless tile is a component or min_fraction is 1.

Args

  • region: Area to fill. If a component, its bounding box is used and its structures in keep_out_layers are avoided.
  • tile: Tile structure, added to fill_layer, or tile component.
  • pitch: Tile pitch, in both directions or as an (x, y) pair. Both values must remain positive after snapping to the grid.
  • fill_layer: Layer for the tile structure. Not used when tile is a component.
  • keep_out_layers: Layers of region to avoid. Not used when region is not a component. If None, defaults to none.
  • clearance: Distance between tiles and keep-out areas. If None, defaults to 0.
  • boundary_clearance: Distance between tiles and the region boundary. If None, defaults to clearance.
  • min_fraction: Minimal area of a cut tile, as a fraction of the full tile area. A value of 1 disables cutting: positions that are not fully clear are left empty. If None, defaults to 1.
  • technology: Component technology. If None, the technology of region is used if it is a component, otherwise the default technology.
  • name: Component name.

Returns

Component with the fill tiles.

Example

>>> coupler = pf.parametric.dual_ring_coupler(
... port_spec="Strip",
... coupling_distance=0.6,
... radius=10,
... euler_fraction=0.5,
... coupling_length=10,
... )
>>> pad = pf.Component("PAD").add("METAL", pf.Rectangle(size=(12, 12)))
>>> design = pf.Component("DESIGN").add(
... pf.Reference(coupler), pf.Reference(pad, (-30, 20)), pf.Reference(pad, (30, -20))
... )
>>> component = pf.parametric.fill(
... region=design,
... tile=pf.Rectangle(size=(2, 2)),
... pitch=4,
... fill_layer="SLAB",
... keep_out_layers=["WG_CLAD", "METAL"],
... clearance=1,
... min_fraction=0.25,
... )
>>> layout = pf.Component().add(pf.Reference(design), pf.Reference(component))

fill