2022-03-01 15:18:31 -08:00
|
|
|
"""
|
|
|
|
Tools are objects which dynamically generate simple single-use devices (e.g. wires or waveguides)
|
|
|
|
"""
|
2023-02-23 13:15:32 -08:00
|
|
|
from typing import TYPE_CHECKING, Sequence
|
2022-03-01 15:18:31 -08:00
|
|
|
|
2023-01-25 23:19:25 -08:00
|
|
|
from ..utils import SupportsBool
|
|
|
|
|
2022-03-01 15:18:31 -08:00
|
|
|
if TYPE_CHECKING:
|
2023-01-21 23:38:53 -08:00
|
|
|
from ..pattern import Pattern
|
2022-03-01 15:18:31 -08:00
|
|
|
|
|
|
|
|
|
|
|
class Tool:
|
|
|
|
def path(
|
|
|
|
self,
|
2023-02-23 13:15:32 -08:00
|
|
|
ccw: SupportsBool | None,
|
2022-03-01 15:18:31 -08:00
|
|
|
length: float,
|
|
|
|
*,
|
2023-02-23 13:15:32 -08:00
|
|
|
in_ptype: str | None = None,
|
|
|
|
out_ptype: str | None = None,
|
2022-03-01 15:18:31 -08:00
|
|
|
port_names: Sequence[str] = ('A', 'B'),
|
|
|
|
**kwargs,
|
2023-01-21 23:38:53 -08:00
|
|
|
) -> 'Pattern':
|
2022-03-01 15:18:31 -08:00
|
|
|
raise NotImplementedError(f'path() not implemented for {type(self)}')
|
|
|
|
|