57 Commits

Author SHA1 Message Date
adebaumann 1ba3e35f5a Tick size area now collapsible 2026-07-31 15:05:50 +02:00
adebaumann c549b1724a Tick size adjustable 2026-07-31 14:59:51 +02:00
adebaumann cfe4b48856 [AC] [DA] and [ACDC] added 2026-07-30 13:17:41 +02:00
adebaumann cef3063b3d renundant namespace file removed 2026-07-30 11:35:37 +02:00
adebaumann 08a8169586 Math mode for left/right text added 2026-07-30 11:22:11 +02:00
adebaumann 3b1e244d55 Fix final-review findings: unit-label baseline, sqrt minor-tick math, dead code, edge cases
- Unit label was vertical-centered on a box derived from a baseline
  coordinate, shifting it 3.34mm too low and making the generated
  deliverables inconsistent with E440-Scale_template.svg. UNIT_Y is now
  used directly as the baseline; regenerated E440-Scale_paths.svg and
  E440-Scale_text.svg accordingly.
- sqrt scale's minor-tick angle formula double-applied the square-root
  mapping, badly misplacing minor ticks. Removed the special case so sqrt
  falls through to the already-correct generic value-interpolation branch.
  Corrected README's sqrt row (crowds toward the high end, not low).
- Removed dead code: unused _has_markup(), identity-transform wrapper and
  _UNIT_SCALE_X in _markup_unit_svg, unreachable max_val<=0 check,
  redundant math.isinf() in the minor-tick condition.
- Linear scale with min==max now raises ValueError like the other three
  mappings, instead of silently producing a degenerate dial.
- Form numeric parsing moved inside the try/except so bad input returns
  400 instead of crashing with 500.
- left_label/right_label now split on splitlines() to handle CRLF from
  browser textareas correctly.
- Formatting consistency: PIVOT_CIRCLE_R/R0 use :.5f like other constants;
  font_face indentation matches its sibling elements.
- LICENSE and CLAUDE.md: last M1730-Scale references and a doc inaccuracy
  about which labels are live text vs. outlined paths.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 00:48:54 +02:00
adebaumann fce7040b21 Rebrand infra and docs from M1730 to E440; bump version to 1.0 2026-07-29 00:11:04 +02:00
adebaumann 584375af02 Replace M1730 deliverable SVGs with generated E440 template/paths/text files 2026-07-29 00:06:37 +02:00
adebaumann e1c76e23bf Update web form for arc-dial fields: unit, left/right labels 2026-07-29 00:02:06 +02:00
adebaumann 4ca61016a7 Implement left/right corner labels; add end-anchor support to text-to-paths 2026-07-28 23:58:36 +02:00
adebaumann b6e1c8e76a Wire up unit label rendering via markup-aware helper 2026-07-28 23:56:49 +02:00
adebaumann a6a6626e8f Implement rotated numeric label generation for the arc scale
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 23:54:49 +02:00
adebaumann 962d2fdf11 Implement arc tick generation with 3 tiers across all scale mappings 2026-07-28 23:49:27 +02:00
adebaumann 3643b65b15 Rewrite generate_svg skeleton around arc geometry (body/rim/pivot only) 2026-07-28 23:44:08 +02:00
adebaumann 845c3ec4d4 Add DIN 1451 fonts as default; drop stray Zone.Identifier files
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 23:38:16 +02:00
adebaumann 9e3af69d38 Ignore .superpowers/ scratch workspace 2026-07-28 23:35:25 +02:00
adebaumann 6c4e0e9a0a Add implementation plan for E440 arc-dial scale generator 2026-07-28 23:24:43 +02:00
adebaumann 852f8fe050 Add design spec for E440 arc-dial scale generator pivot 2026-07-28 23:09:07 +02:00
adebaumann 11ab6476c9 New logo 2026-07-17 22:40:23 +02:00
adebaumann 1740e0db02 Half-height unit uses lower half of panel box; bump to 0.87
Changed from top half (y0=92.8, y1=103.8) to bottom half (y0=103.8,
y1=114.8). The label baseline sits at y≈101.5mm, so the lower half
starts 2.3mm below it — clean visual separation without the unit
appearing high up on the panel.
2026-07-15 00:17:14 +02:00
adebaumann 6bf7c70231 Font-aware unit sizing; half-height unit toggle; bump to 0.86
Paths-mode unit rendering now always goes through _markup_unit_svg,
which fits the font's actual ink bounds (width AND height) to the
unit box — correct for all fonts, not just ГОСТ тип А.

Added half-height unit toggle: restricts the unit label to the upper
half of the panel box (y1 = midpoint at 103.8 mm), keeping it clear
of the numeric labels when they visually crowd the unit area.
2026-07-15 00:10:02 +02:00
adebaumann 62d9f02a82 Add font selector; load all fonts from fonts/ directory; bump to 0.85
All .ttf files in fonts/ are loaded at startup. The web form now has a
font selector dropdown. Glyph-rendering helpers that previously used
module-level font globals now accept a _FontData parameter threaded
through from generate_svg().

Dockerfile updated to copy all of fonts/ into the image rather than a
single hardcoded .ttf path.
2026-07-14 23:51:55 +02:00
adebaumann 8d45a6d10f Fix reciprocal minor tick spacing; bump to 0.84
Minor ticks on 1/x scales were using linear value interpolation between
harmonically-spaced major ticks. Because 1/v is highly convex, equal value
steps near a large major-value (left side of the first interval) map to tiny
physical steps, piling all ticks against the left wall. At a 1:1000 ratio the
first four minor ticks land at 0%/0%/1%/2% of the interval.

Fix: interpolate in position space (uniform physical spacing) for all
reciprocal intervals, matching how major ticks are laid out (also equal
physical steps) and matching the already-correct ∞-first-interval handling.

Also documents 1/x scale and ∞ max in README.
2026-07-14 23:33:55 +02:00
adebaumann f19c462c1b Add infinity max option for reciprocal scale 2026-07-14 23:28:40 +02:00
adebaumann cf844d007b Add reciprocal (1/x) scale mapping 2026-07-14 23:25:01 +02:00
adebaumann 67b546cc97 Bump version to 0.81 2026-07-14 23:18:37 +02:00
adebaumann a870860f42 Document sqrt scale mapping and update mapping table 2026-07-14 19:31:24 +02:00
adebaumann f9fca519b0 Bump version to 0.80 2026-07-14 19:29:47 +02:00
adebaumann 846fe2d235 Fix sqrt minor ticks: crowd toward low end via squared position 2026-07-14 19:27:40 +02:00
adebaumann 73917aca1e Add square-root scale mapping 2026-07-14 19:17:35 +02:00
adebaumann f676651edb Add unit-label markup: super/subscripts and stacked fractions
Lighter shorthand (^x, _x, {a/b}) rendered as glyph paths in the ГОСТ
font — no LaTeX engine, so typography and self-contained output are
preserved. Constructs nest (e.g. {m/s^2}, x^{1/2}). A marked-up unit is
sized to its true ink bounding box and centered in the unit box with
white space, fitting in both axes so tall fractions don't overflow.

Also fit plain units by measured glyph width rather than a per-character
estimate. Bump to 0.77.
2026-07-14 16:40:50 +02:00
adebaumann edeb696238 Document log mapping, custom labels, and label size in README 2026-07-13 01:18:15 +02:00
adebaumann 54a7f072c4 Add configurable label font size; bump to 0.76
- New "Label size (mm)" field controlling the numeric-label font size,
  defaulting to a clean 9 mm (was the inherited Inkscape value 8.89194)
- Pin k8s deployment to image tag 0.76
2026-07-13 00:59:14 +02:00
adebaumann 5ae79499cb Add logarithmic scale, custom labels, and fixed-point number formatting
- New Linear/Log mapping toggle; log mode uses geometric major-tick
  values with log-positioned minor ticks (validates min/max > 0)
- Optional comma-separated custom labels that override the calculated
  numbers and set the label count
- Format numbers in fixed-point at 4 significant figures (no more
  scientific notation like "1e+04"), snapping log-scale FP drift to ints
- Bump version to 0.75
2026-07-13 00:40:36 +02:00
adebaumann 1d5592e49e Bump version to 0.72 2026-07-12 15:32:09 +02:00
adebaumann f84f677123 Add Umami analytics and session recording 2026-07-12 15:31:20 +02:00
adebaumann c42a46f536 Bump version to 0.71 2026-07-12 15:07:59 +02:00
adebaumann 6cf04a427c Add source link and increase version tag contrast 2026-07-12 15:07:15 +02:00
adebaumann 9885da3456 Populate README 2026-07-12 14:59:48 +02:00
adebaumann 71c0e5f498 Add divisor hint below Labels field 2026-07-12 14:58:22 +02:00
adebaumann 60a35b526f Fix mode toggle border stretching full width 2026-07-12 14:51:00 +02:00
adebaumann 9bf10f184b Suppress :focus-visible outline on mode toggle buttons 2026-07-12 14:48:36 +02:00
adebaumann dd841443b8 Remove focus outline from mode toggle buttons 2026-07-12 14:46:41 +02:00
adebaumann 624aa8828e Add Paths/Text output mode toggle with descriptions 2026-07-12 14:44:17 +02:00
adebaumann 6e9cd9109c Convert SVG text to paths via fontTools; drop embedded font 2026-07-12 14:41:11 +02:00
adebaumann 6b1523539f Set SVG background to white; bump image to 0.5 2026-07-12 01:35:29 +02:00
adebaumann 71f4e65538 Redesign UI with Baumann Works branding and logo 2026-07-12 01:28:41 +02:00
adebaumann ebba1ade5e Fix fetch URL resolution when served under a subpath 2026-07-12 01:21:55 +02:00
adebaumann b4dc8d6e65 Switch IngressRoute to web entrypoint (HTTP port 80) 2026-07-12 01:17:35 +02:00
adebaumann dd4e3e8540 Fix Traefik API group to traefik.containo.us (v2 cluster) 2026-07-12 00:58:22 +02:00