M1730-Scale
SVG scale artwork and web generator for M1730 analog panel meters. Scales are typeset in ГОСТ тип А (GOST type A), the Russian technical drafting standard typeface.
Repository layout
M1730-Scale_template.svg Inkscape working file (background, tick marks, labels)
M1730-Scale_paths.svg Paths-only export — text converted to outlines
M1730-Scale_text.svg Live-text export — embedded font, editable labels
fonts/ ГОСТ тип А TTF (required for Docker build)
web/ Flask web generator
k8s/ Kubernetes manifests
Dockerfile Container build
SVG files
All canvases are 157.18 × 26.68 mm. The coordinate origin is offset: layer 1 carries transform="translate(-37.352226,-90.454928)", so absolute SVG coordinates begin around x=37, y=90.
| File | Purpose |
|---|---|
M1730-Scale_template.svg |
Master Inkscape file. Contains background path, tick marks, unit label, numeric labels, and range label. Edit this one. |
M1730-Scale_paths.svg |
All text converted to outlines. Use for cutting plotters, laser engravers, or any workflow where fonts must not be embedded as live text. |
M1730-Scale_text.svg |
Live <text> nodes with the font embedded as base64. Smaller file; requires an SVG viewer that supports embedded fonts. |
Open files in Inkscape (developed with v1.4.3). There is no build step — edit the SVG directly or use the web generator.
Web generator
A Flask app that generates scale SVGs from a form. Supports two output modes switchable in the UI:
- Paths — glyphs rendered as outlines via fontTools; opens cleanly in Inkscape, Illustrator, and cutting software
- Text — live
<text>elements with the GOST font embedded as base64
Run locally
source .venv/bin/activate
cd web && python app.py # http://localhost:5000
The font must be installed at /usr/local/share/fonts/г/ГОСТ_тип_А.ttf.
Form parameters
| Field | Description |
|---|---|
| Unit | Symbol shown in the left panel (e.g. U, mA, %) |
| Range label | Text inside the coloured bar on the right (e.g. 5mA) |
| Mapping | Linear or Log. Log spaces values geometrically (major ticks evenly spaced, minor ticks crowding toward the high end) and requires Min and Max greater than 0 |
| Min / Max | Numeric range of the scale |
| Major intervals | Number of major tick intervals |
| Minor per interval | Minor ticks between each pair of major ticks |
| Labels | Number of numeric labels; Labels − 1 should divide evenly into Major intervals |
| Custom labels | Optional comma-separated labels that override the calculated numbers; their count sets the number of labels. Leave blank to auto-calculate |
| Label size (mm) | Font size of the numeric labels, in millimetres (default 9) |
Calculated numbers are rendered in fixed-point notation at 4 significant figures — never scientific (e.g. 10000, not 1e+04).
Container
# Copy the font first (not redistributed via the registry)
cp /usr/local/share/fonts/г/ГОСТ_тип_А.ttf fonts/
docker build -t m1730-scale:latest .
docker run -p 5000:5000 m1730-scale:latest
The production image is at git.baumann.gr/adebaumann/m1730-generator.
Kubernetes
Manifests in k8s/ deploy to the works namespace with a Traefik v2 IngressRoute at works.baumann.gr/M1730-generator.
# Managed by ArgoCD — push to git to deploy
git push
Resources: namespace, deployment (1 replica, gunicorn), ClusterIP service, Traefik IngressRoute + stripPrefix middleware.
License
GPL-3.0 — see LICENSE.