(
name: str, args: list[Union[Point, gm.Point]]
)
| 1324 | |
| 1325 | |
| 1326 | def sketch( |
| 1327 | name: str, args: list[Union[Point, gm.Point]] |
| 1328 | ) -> list[Union[Point, Line, Circle, HalfLine, HoleCircle]]: |
| 1329 | fun = globals()['sketch_' + name] |
| 1330 | args = [p.num if isinstance(p, gm.Point) else p for p in args] |
| 1331 | out = fun(args) |
| 1332 | |
| 1333 | # out can be one or multiple {Point/Line/HalfLine} |
| 1334 | if isinstance(out, (tuple, list)): |
| 1335 | return list(out) |
| 1336 | return [out] |
| 1337 | |
| 1338 | |
| 1339 | def sketch_on_opline(args: tuple[gm.Point, ...]) -> HalfLine: |
no outgoing calls
no test coverage detected