fill

photonforge.parametric.fill(*, region=None, tile=None, pitch=None, fill_layer=None, keep_out_layers=None, clearance=None, boundary_clearance=None, min_fraction=None, technology=None, name=None)[source]

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.

Parameters:
  • region (Component | Rectangle | Circle | Polygon | Path | Sequence[Rectangle | Circle | Polygon | Path] | None) – Area to fill. If a component, its bounding box is used and its structures in keep_out_layers are avoided.

  • tile (Component | Rectangle | Circle | Polygon | Path | None) – Tile structure, added to fill_layer, or tile component.

  • pitch (Annotated[float, exclusiveMinimum=0, units='μm'] | Annotated[Sequence[Annotated[float, exclusiveMinimum=0, units='μm']], maxItems=2, minItems=2] | None) – Tile pitch, in both directions or as an (x, y) pair. Both values must remain positive after snapping to the grid.

  • fill_layer (Annotated[str | tuple[int, int], _] | None) – Layer for the tile structure. Not used when tile is a component.

  • keep_out_layers (Sequence[Annotated[str | tuple[int, int], _]] | None) – Layers of region to avoid. Not used when region is not a component. If None, defaults to none.

  • clearance (Annotated[float, minimum=0, units='μm'] | None) – Distance between tiles and keep-out areas. If None, defaults to 0.

  • boundary_clearance (Annotated[float, minimum=0, units='μm'] | None) – Distance between tiles and the region boundary. If None, defaults to clearance.

  • min_fraction (Annotated[float, maximum=1, minimum=0] | None) – 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 (Technology | None) – Component technology. If None, the technology of region is used if it is a component, otherwise the default technology.

  • name (str | None) – Component name.

Returns:

Component with the fill tiles.

Return type:

Component

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")
pad.add("METAL", pf.Rectangle(size=(12, 12)))

design = pf.Component("DESIGN")
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,
)
fill