Conversation
Pure static class with dict-dispatch handler registry supporting 12 operations: parallel, perpendicular, collinear, concyclic, equal_length, similar, congruent, tangent, concurrent, point_on_line, point_on_circle, and auto. Uses scale-aware relative tolerance, degenerate input guards (zero-length segments, NaN/inf coordinates), and bounded segment tangency checks.
Add inspect_relation() method on Canvas that resolves drawable names via _resolve_drawable_by_type() and delegates to RelationInspector. Register as a query-only tool (not in undoable functions).
Add strict JSON schema with 12-value operation enum and typed arrays for objects/object_types. Update expected tool count (87 -> 88) and hash.
13 test classes with 35 tests covering all 12 operations, error cases, symmetry, near-threshold behavior, scale-invariant collinearity at large coordinates, and bounded segment tangency edge cases.
Add Example Prompts section, Reference Manual entry with supported operations and usage examples, and mark relation inspector as done in todo.txt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inspect_relationtool — a query-only geometric relation checker supporting 12 operations: parallel, perpendicular, collinear, concyclic, equal_length, similar, congruent, tangent, concurrent, point_on_line, point_on_circle, and autoRelationInspectorclass following theGraphAnalyzerdispatch pattern with scale-aware tolerances and degenerate input guardsinspect_relation()+_resolve_drawable_by_type(), registered in FunctionRegistry (not undoable)Codex review feedback addressed
cross / (|a| * |b|)) instead of single magnitudeTest plan
venv/bin/python -m pytest server_tests/ -v— 971 passedvenv/bin/python -m cli.main test client --start-server --timeout 600 --json— 2524 passed, 0 failuresvenv/bin/python -m mypy static/client/utils/relation_inspector.py— no issues🤖 Generated with Claude Code