Constraint glyphs: one per constrained entity, beside it, readable
Fixes #43 - Two-entity constraints (parallel, tangent, equal, ...) get a glyph on each entity. - Glyphs sit beside their entity (offset along its screen normal), step along it when crowded, with a faint leader when pushed away; 15 px boxes with the toolbar's constraint icons (H/V stay letters), coloured from the theme's glyph tokens in both themes. - Hovering a glyph lights both of its glyphs and its curves/points and names the constraint. - Removes the old duplicate glyph drawer in viewport.rs (it drew a second, green set). - Scenario expect key `glyphs` ({constraint id: count}, none overlapping) and the scenario constraint_glyphs_both_entities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT
This commit is contained in:
1 parent
eac7306d59
commit
a5729f1f97
4 files changed
+170
-85
No files matched your search
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{"call": "engine.execute", "params": {"command": "sketch.create", "params": {"plane": "XY"}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.rectangle.two_point", "params": {"p0": [0, 0], "p1": [40, 20]}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.circle.center", "params": {"center": [60, 10], "radius": 5}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.line", "params": {"points": [[45, -10], [75, -10]]}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.line", "params": {"points": [[45, 30], [75, 30]]}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.constraint.parallel", "params": {"a": "l5", "b": "l6"}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.constraint.tangent", "params": {"a": "l5", "b": "c1"}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.constraint.tangent", "params": {"a": "l6", "b": "c1"}}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.constraint.equal", "params": {"a": "l5", "b": "l6"}}},
|
||||
{"call": "ui.view", "params": {"view": "top"}},
|
||||
{"call": "ui.view", "params": {"view": "fit"}},
|
||||
{"expect": {"glyphs": {"k1": 1, "k5": 2, "k6": 2, "k7": 2, "k8": 2}}}
|
||||
]
|
||||
Reference in new issue
Block a user