forked from 1b-agent/opencadstudio-upstream
The continued dimension line was positioned with an offset measured from the base dimension's *first* extension origin, then re-applied to each new chain point (the previous dim's second origin). When the two extension origins sat at different perpendicular positions — i.e. the extension lines had different lengths — that offset placed the new dim line at `D + (p2 - p1)·perp` instead of the base line's `D`, so the chain drifted off the base line. Equal-length extension lines have `(p2 - p1)·perp = 0`, which is why it only misbehaved sometimes. Store the base dim line's absolute perpendicular coordinate and project each extension origin onto it, so the whole chain stays collinear regardless of extension-line lengths. The preview uses the same projection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>