MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _load_scene

Function _load_scene

SLiCAP/schematic/cli.py:40–56  ·  view source on GitHub ↗

Load a .slicap_sch file and return (SchematicScene, SchematicData).

(input_path: Path)

Source from the content-addressed store, hash-verified

38# ── shared scene loader ───────────────────────────────────────────────────────
39
40def _load_scene(input_path: Path):
41 """Load a .slicap_sch file and return (SchematicScene, SchematicData)."""
42 from .schematic_data import SchematicData
43 from .symbol_library import SymbolLibrary
44 from .canvas import SchematicScene
45 from . import project
46
47 project.set_current(input_path) # LaTeX cache → <name>.cache, not a temp dir
48 import SLiCAP.schematic.config as _config
49 _config.load(project.ini_path()) # apply schematic's saved style settings
50 data = SchematicData.load(input_path)
51 library = SymbolLibrary(_SYMBOLS_SVG)
52 library.add_bundle(project.symbols_path()) # this schematic's frozen symbols
53 library.inject_into_component_item()
54 scene = SchematicScene()
55 scene.from_data(data, library)
56 return scene, data
57
58
59# ── subcommands ───────────────────────────────────────────────────────────────

Callers 3

cmd_netlistFunction · 0.85
cmd_svgFunction · 0.85
cmd_pdfFunction · 0.85

Calls 6

add_bundleMethod · 0.95
from_dataMethod · 0.95
SymbolLibraryClass · 0.85
SchematicSceneClass · 0.85
loadMethod · 0.80

Tested by

no test coverage detected