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
tileis a component ormin_fractionis 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_layersare 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
tileis a component.keep_out_layers (Sequence[Annotated[str | tuple[int, int], _]] | None) – Layers of
regionto avoid. Not used whenregionis not a component. IfNone, 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 toclearance.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 ofregionis used if it is a component, otherwise the default technology.name (str | None) – Component name.
- Returns:
Component with the fill tiles.
- Return type:
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,
)