[Pather] move render check from __del__ to __exit__ and use render= enum instead of auto_render

This commit is contained in:
Jan Petykiewicz 2026-07-09 12:28:05 -07:00
commit 9a39a436b2
13 changed files with 277 additions and 126 deletions

View file

@ -13,7 +13,7 @@ def main() -> None:
library, M1_tool, M2_tool = prepare_tools()
# Create a deferred Pather and place some initial pads (same as Pather tutorial)
rpather = Pather(library, tools=M2_tool, auto_render=False)
rpather = Pather(library, tools=M2_tool, render='deferred')
rpather.place('pad', offset=(18_000, 30_000), port_map={'wire_port': 'VCC'})
rpather.place('pad', offset=(18_000, 60_000), port_map={'wire_port': 'GND'})
@ -157,7 +157,7 @@ def main() -> None:
#
# Rendering and Saving
#
# Since we deferred auto-rendering, we must call .render() to generate the geometry.
# Since routing is deferred, we must call .render() to generate the geometry.
rpather.render()
library['PortPather_Tutorial'] = rpather.pattern