From a6b5405fdcc8c3aaba3b40a0f252c4b797340047 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Wed, 22 Jul 2026 21:22:39 -0400 Subject: [PATCH] Path graph: flatten the lane-change curve so its stroke reads thin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bezier lane change pinned both tangents flat against its platforms, which made the roundest S — and its thickest. A braille cell is 2 dots wide by 4 tall, so a stroke steeper than one dot across per dot down must light two-plus dots per cell to stay joined and reads heavy; a level-tangent S concentrates the whole vertical drop into a steep middle, so one shift came out thin at its eased ends and thick through a bold knee in the centre. Straighten the S toward a constant-slope diagonal (BEND_K 0.5 -> 0.2) so the drop spreads evenly and the stroke stays as thin as the geometry allows along its whole length, and give the curve more horizontal room (CURVE_SPAN 0.8 -> 0.9) so its slope — and thus its stroke — stays shallow. Worst-case cell density drops from 4 dots to 3 and the heavy knees become long gentle sweeps, while the ends still ease off the platforms with no hard corner. Geometry (node columns and lanes) is untouched — only the edge paths change. Co-Authored-By: Claude Opus 4.8 --- meshterm/ui/pathgraph.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/meshterm/ui/pathgraph.py b/meshterm/ui/pathgraph.py index e43e329..39a2ccb 100644 --- a/meshterm/ui/pathgraph.py +++ b/meshterm/ui/pathgraph.py @@ -103,8 +103,11 @@ _GRAPH_PAD_DOTS = 6 #: share lengthens the flat platforms and steepens the (now shorter) curve between them. Sizing #: the curve as a fraction of the gap — rather than by a fixed slope keyed off the vertical #: offset — keeps the platform-to-curve proportion constant however wide or narrow the columns -#: fall. -_CURVE_SPAN = 0.8 +#: fall. Kept generous so the curve has room to stay shallow: a braille cell is 2 dots wide by +#: 4 tall, so a stroke steeper than one dot across per dot down must light two dots in a cell to +#: stay joined and reads *thick* — giving the curve more horizontal run keeps its slope, and so +#: its stroke, thin. +_CURVE_SPAN = 0.9 #: The shortest horizontal run a lane change is given even for a one-lane hop, so a tight #: column gap still bends across a few dots rather than snapping over in one abrupt step. @@ -112,9 +115,14 @@ _MIN_SHIFT_DOTS = 4 #: How far (as a fraction of the shift's horizontal span) the bezier control points sit in #: from each end — both placed level with their own end, so the curve leaves and enters the -#: platforms horizontally. Near ½ the S is at its roundest; lower tightens it toward a -#: straight diagonal with only its corners eased. -_BEND_K = 0.5 +#: platforms horizontally. Near ½ the S is at its roundest, but a round S is also its *thickest*: +#: pinning both tangents flat concentrates the whole vertical change into a steep middle that +#: lights two-plus dots per braille cell (a heavy knee), while the shallow ends stay thin — so +#: one shift reads as thin at its ends and thick through its centre. A low value straightens the +#: S toward a constant-slope diagonal (only its corners eased), spreading the drop evenly so the +#: stroke is as thin as the geometry allows along its whole length; too low brings the corners +#: back as visible kinks. Tuned low for an even, thin stroke that still eases off the platforms. +_BEND_K = 0.2 #: Dots left of our marker the flow arrow sits — one cell, so it embeds in the trunk as ``▶★`` #: and marks the node → us direction without crowding the endpoint.