Part-DB-server/config
Sebastian Almberg d73bc42362 Add a component value calculator & image generator
Adds a "Value calculator" tool (Tools menu) that decodes/encodes the value of
common components and generates a clean SVG picture you can attach to a part —
handy for assortments imported with blank thumbnails and sparse data.

Calculator tabs (bidirectional decode <-> encode), each drawing the part to the
selected package with a collapsible appearance panel and an "attach to part"
action (optionally as the master picture):
- Resistor: 4/5/6-band colour code
- Capacitor: value <-> 3-digit code <-> tolerance
- SMD resistor: value <-> 3-digit / 4-digit / EIA-96 code
- Inductor: colour-band code
- SMD inductor: value <-> uH code

Bulk "Generate component images" parts-table action:
- Classifies each selected part (resistor / capacitor / inductor / diode / LED,
  THT or SMD) with ComponentValueGuesser and detects value, voltage, tolerance,
  power, ppm, pitch, diameter, colour, SMD package and marking from the name,
  description and parameters.
- Renders a preview per part, lets you tweak appearance, and attaches the images
  in one go; can also write matching KiCad symbol/footprint/reference-prefix EDA
  fields.

Backend: ComponentValueGuesser (classification + detection + EDA suggestion),
GeneratedImageAttachmentHelper (stores the SVG through the existing attachment
pipeline, so it is sanitised on save), two POST endpoints on PartController
(generate_image, set_eda) guarded by `edit` + CSRF, a new `@tools.value_calculator`
permission, a Tools-tree entry and docs. All drawing is client-side in a Stimulus
controller; the un-sanitised live preview escapes part-derived text and validates
colours as defence-in-depth.

Tests: unit tests for ComponentValueGuesser and functional tests for the
endpoints, including permission and CSRF enforcement and the persisted side
effects.
2026-07-30 17:49:18 +02:00
..
packages Fixed depprecation of fluent config builders 2026-06-25 12:33:52 +02:00
routes Updated framework-bundle recipe 2025-07-13 16:40:14 +02:00
banner.md Allow to override the banner with its existing env variable 2025-08-24 17:37:16 +02:00
bundles.php Use symfony AI platform for AI provider 2026-04-23 23:26:23 +02:00
parameters.yaml Added korean as selectable language 2026-07-19 15:54:28 +02:00
permissions.yaml Add a component value calculator & image generator 2026-07-30 17:49:18 +02:00
preload.php Updated symfony recipes. 2021-01-03 20:54:47 +01:00
reference.php Updated ai libraries to latest version 2026-07-19 14:25:15 +02:00
routes.yaml Updated routing recipe 2025-11-30 15:01:37 +01:00
services.yaml Increased timeout for local AI inferences, and made AI timeout configurable per provider 2026-06-22 22:06:30 +02:00