[Pather / AutoTool] rework route kwargs into tool_options, and actualyl pass them through AutoTool
This commit is contained in:
parent
49713896c3
commit
67afee7704
11 changed files with 865 additions and 130 deletions
|
|
@ -271,13 +271,13 @@ class PrimitiveWireTool(Tool):
|
|||
**kwargs: Any,
|
||||
) -> tuple[StraightOffer | BendOffer, ...]:
|
||||
if kind == 'straight':
|
||||
route_kwargs = dict(kwargs)
|
||||
tool_options = dict(kwargs)
|
||||
|
||||
def endpoint_planner(length: float) -> Port:
|
||||
return Port((length, 0), rotation=pi, ptype=self.ptype)
|
||||
|
||||
def commit_planner(length: float) -> WireStraightData:
|
||||
_ = route_kwargs
|
||||
_ = tool_options
|
||||
return WireStraightData(length)
|
||||
|
||||
native_offer = StraightOffer(
|
||||
|
|
@ -354,7 +354,6 @@ class PrimitiveWireTool(Tool):
|
|||
batch: Sequence[RenderStep],
|
||||
*,
|
||||
port_names: tuple[str, str] = ('A', 'B'),
|
||||
**kwargs: Any, # noqa: ARG002 (no per-render options in this example tool)
|
||||
) -> ILibrary:
|
||||
tree, pat = Library.mktree(SINGLE_USE_PREFIX + 'primitive_wire')
|
||||
pat.add_port_pair(names=port_names, ptype=batch[0].start_port.ptype if batch else self.ptype)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue