load_phf

photonforge.load_phf(filename, only_explicit=True, set_config=True)

Load the contents of a phf file.

Parameters:
  • filename (str) – File path to load.

  • only_explicit (bool) – If set, only explicitly-saved objects are returned (excludes automatically included dependencies).

  • set_config (bool) – If True, set config.grid and config.tolerance with values loaded from the file.

Returns:

Dictionary with keys "components" and "technologies", each holding a list of loaded objects.

Return type:

dict[Literal[“components”, “technologies”], list[Component] | list[Technology]]

See also

Y Splitter