MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / sketch

Function sketch

numericals.py:1326–1336  ·  view source on GitHub ↗
(
    name: str, args: list[Union[Point, gm.Point]]
)

Source from the content-addressed store, hash-verified

1324
1325
1326def 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
1339def sketch_on_opline(args: tuple[gm.Point, ...]) -> HalfLine:

Callers 1

try_to_sketch_intersectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected