Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ jobs:
- name: Install OpenStitch Studio & test dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest
pip install -e ".[dev]"

- name: Run full test & binary embroidery verification suite
env:
QT_QPA_PLATFORM: offscreen
run: |
pytest tests -v
pytest tests -v --durations=10

- name: Check the built-in test designs with the virtual stitch-out
env:
QT_QPA_PLATFORM: offscreen
run: |
python -m openstitch.analysis --corpus --formats
52 changes: 50 additions & 2 deletions .github/workflows/release_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Release Binaries (Windows & macOS M-Chip + Intel)
name: Build Release Binaries (Windows, macOS M-Chip + Intel, Linux)

on:
workflow_dispatch:
Expand All @@ -10,6 +10,8 @@ on:
push:
tags:
- 'v*'
pull_request:
branches: [ main ]

permissions:
contents: write
Expand All @@ -35,6 +37,11 @@ jobs:
arch: x64
python: "3.11"
asset_name: OpenStitch-Studio-Windows-x64.exe
- name: Linux-x64
os: ubuntu-22.04
arch: x64
python: "3.11"
asset_name: OpenStitch-Studio-Linux-x64.tar.gz

runs-on: ${{ matrix.os }}

Expand All @@ -49,6 +56,12 @@ jobs:
architecture: ${{ matrix.arch }}
cache: 'pip'

- name: Install Linux GUI libraries
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libgl1 libxkbcommon-x11-0 libxcb-cursor0 libdbus-1-3

- name: Install dependencies & PyInstaller
run: |
python -m pip install --upgrade pip
Expand All @@ -59,6 +72,7 @@ jobs:
if: runner.os == 'macOS'
run: |
pyinstaller --noconfirm --windowed --name "OpenStitch Studio" \
--osx-bundle-identifier org.openstitch.studio \
--exclude-module pytest --exclude-module tkinter --exclude-module matplotlib \
main.py
cd dist
Expand All @@ -70,12 +84,46 @@ jobs:
run: |
pyinstaller --noconfirm --onefile --windowed --name "OpenStitch-Studio-Windows-x64" --exclude-module pytest --exclude-module tkinter --exclude-module matplotlib main.py

- name: Build Linux single file
if: runner.os == 'Linux'
run: |
pyinstaller --noconfirm --onefile --windowed --name "OpenStitch-Studio" \
--exclude-module pytest --exclude-module tkinter --exclude-module matplotlib \
main.py
tar -C dist -czf "dist/${{ matrix.asset_name }}" OpenStitch-Studio

- name: Self-test the packaged app
shell: bash
env:
QT_QPA_PLATFORM: offscreen
run: |
case "$RUNNER_OS" in
macOS) app="dist/OpenStitch Studio.app/Contents/MacOS/OpenStitch Studio" ;;
Linux) app="dist/OpenStitch-Studio" ;;
*) app="dist/OpenStitch-Studio-Windows-x64.exe" ;;
esac
rc=0
"$app" --selftest || rc=$?
cat openstitch-selftest.txt || echo "no report written"
exit $rc

- name: Keep the build for testing (pull requests)
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: dist/${{ matrix.asset_name }}
retention-days: 7

- name: Upload to GitHub Release
if: github.event_name != 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
run: |
if [ "${{ runner.os }}" = "macOS" ]; then
# Ein reiner Tag-Push ohne vorbereitete Notizen darf den Build nicht scheitern lassen
gh release view "$RELEASE_TAG" >/dev/null 2>&1 || gh release create "$RELEASE_TAG" --generate-notes || true
if [ "${{ runner.os }}" != "Windows" ]; then
gh release upload "$RELEASE_TAG" "dist/${{ matrix.asset_name }}" --clobber
else
gh release upload "$RELEASE_TAG" "dist/OpenStitch-Studio-Windows-x64.exe" --clobber
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Stress tests

# Lange Zufallstests, zu langsam für jeden Push
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1'

jobs:
stress:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libgl1 libxkbcommon-x11-0 libxcb-cursor0 libdbus-1-3
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Fuzz, damaged files and monkey test
env:
QT_QPA_PLATFORM: offscreen
OPENSTITCH_FUZZ_RUNS: "400"
OPENSTITCH_BADFILE_ROUNDS: "200"
OPENSTITCH_MONKEY_STEPS: "1500"
OPENSTITCH_MONKEY_SEEDS: "1,2,3,4,5,6"
run: |
pytest tests/test_fuzz.py tests/test_bad_files.py tests/test_monkey.py -v
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ dist/

# Claude Code worktrees / local settings
.claude/

# Zufallstests
.hypothesis/
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

## v0.4.0

### Virtual stitch-out
- **Check design (`F7`) replaces the old Doctor.** You get a score out of 100, findings in plain language, a Show button that jumps to the spot and a Fix button where a one-click fix exists.
- **Fabric pull simulation.** A spring model shows how thread tension pulls the fabric in, with a preview you can exaggerate. Earlier objects move when later ones are stitched, so it can warn about gaps between a fill and its outline. Until you calibrate a fabric, this is an estimate.
- **Fixed rules and estimates are labelled.** Findings from the stitches are exact; only fabric pull is an estimate.
- **Calibration with real fabric.** Stitch a small test bar, measure it, enter the width. The simulation and pull compensation then use the measured value for that fabric.
- **Export check.** Every machine format is written, read back with an independent parser and compared stitch by stitch.
- **Command line:** `python -m openstitch.analysis design.dst --fabric jersey --formats`.

### Stitch quality fixes found by the simulator
- **Satin density now works.** Spacing above about 0.4 mm had no effect, and needle holes along satin edges were uneven.
- Split satin no longer exceeds the maximum stitch length (it could by 17 %).
- The density guard can no longer turn repeated lines into 13 mm stitches, and it keeps lock stitches at run ends.
- Degenerate column lines can no longer throw stitches far off the shape.
- Hidden travel along a shape's edge no longer cuts across holes at the ring's start corner.
- **VP3 files with an accented thread name (such as Grün) were corrupted** and could not be read back. Thread names are now written in plain characters in all formats.
- Damaged project files give a clear message instead of crashing plan building.

### New
- **Real fabric choice** (cotton, denim, cap, piqué, T-shirt, fleece, towel, leather, silk). It sets pull compensation and density, and tells you which stabilizer and needle to use.
- **Hidden stitches are skipped.** A fill no longer stitches under a later object that fully covers it, which saves stitches and avoids board-stiff spots. It keeps running 1 mm under the edge so no gaps open, and thin objects such as lettering keep their fill.
- **Send to machine.** Picks the right format for your machine, finds USB sticks, offers short names for older machines, lists the thread order, verifies the saved file and never overwrites silently.
- **Micro font tuned with a legibility measure.** `l` and `I` now differ, `A`, `e`, `4` have more open counters and `a` is easier to tell from `o`. From 3 mm every counter stays open; at 2.5 mm `e` and `4` are tight.
- Fixed: the text dialog refused heights under 4 mm, so 2.5 mm lettering could only be set afterwards. It now has a live preview and suggests the Micro font for small text.

### Easier to use
- **Start page** with four clear ways in, sample designs and recent files.
- **The window fits a laptop.** It needed 2212 px of width and now fits 1280 px.
- **Light theme** next to the dark one, and a redesigned layout with a shorter toolbar.
- **One Open dialog** for projects, embroidery files, SVG and images.
- **Autosave with crash recovery**, and a crash report instead of a silent exit.
- **Five more languages:** Italian, Portuguese, Dutch, Polish and Turkish. These are machine translations, so corrections from native speakers are very welcome.
- The app starts in your system language, otherwise English. The tour is translated.
- Help menu: keyboard shortcuts, report a problem, about.
- Your machine choice is remembered.

### Project
- Random shape tests, damaged file tests and a monkey test that clicks through the real window. Long versions run weekly.
- Linux download in releases. Every pull request now builds and self-tests the app on Windows, macOS (Apple Silicon and Intel) and Linux.
- The README explains how to open the unsigned app on a Mac.

## v0.3.0 (2026-10-28)

### New
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,18 @@ Mit dem Einreichen eines Pull Requests oder Beitrags (Contribution) erklärst du
1. Du bestätigst, dass du der Urheber deines Beitrags bist und das Recht hast, ihn einzureichen.
2. Du räumst dem Projektgründer und Haupturheber **Linus Baumberger (`@lb2002`)** ein unwiderrufliches, weltweites, gebührenfreies, nicht-exklusives und unterlizenzierbares Recht ein, deinen Beitrag zusammen mit OpenStitch Studio sowohl unter der **GNU AGPL-3.0-or-later** als auch unter beliebigen anderen (einschließlich kommerziellen / proprietären Dual-Licensing-) Lizenzen zu nutzen, zu verändern und zu verbreiten.
3. Du behältst selbstverständlich das Urheberrecht an deinem eigenen Beitrag.

## Testing your change

```bash
pip install -e ".[dev]"
pytest tests -q
python -m openstitch.analysis --corpus --formats
```

The random tests get longer with `OPENSTITCH_FUZZ_RUNS`, `OPENSTITCH_MONKEY_STEPS`, `OPENSTITCH_MONKEY_SEEDS` and `OPENSTITCH_BADFILE_ROUNDS`. A long run happens every week in the Stress tests workflow.

## Adding a language

Copy `openstitch/locales/it.py`, translate the values, and add the language to `LANGUAGES` in `openstitch/i18n.py` and to `openstitch/locales/__init__.py`. A test checks that no text is missing and that placeholders such as `{count}` stayed the same.

20 changes: 15 additions & 5 deletions README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Feine Konturen → **Dreifach-/Beanstich**
* Schriften & Säulen → **Auto-Satinstich** mit fließend mitdrehendem Stichwinkel, Kurzstichen (Short-Stitches) in engen Innenkurven, Split-Satin bei breiten Säulen und automatischer Unterlage
* Große Flächen → **Tatami-Füllstich** oder **gebogener Kontur-Füllstich (Contour Fill)** mit Boustrophedon-Abschnittszerlegung, unsichtbarem Travel-Routing entlang der Außenkante, Kanten-/Gitter-Unterlage und richtungsabhängiger Zugkompensation (Pull Compensation)
* **Color-Trap vs. Smart Knockdown + 0.7 mm Überlappungslinie:** Verhindert einerseits brettharte Doppellagen („Bulletproof Embroidery“) und andererseits weiße Stoffblitzer (Passerlücken) zwischen angrenzenden Farbflächen.
* **Verdecktes wird nicht gestickt:** Füllungen laufen nicht unter Objekten weiter, die sie ganz zudecken. Eine kleine Überlappung verhindert Lücken.
* **Stoffprofile:** Standard (Baumwolle/Twill), Piqué/Polo/Strick, Frottee/Handtuch, Kappe/Cap, Leichter Stoff.
* **Drag & Drop:** Ziehe Bilder (`.png`, `.jpg`, `.webp`), `.svg`-Vektorgrafiken oder Stickdateien direkt aus dem Explorer/Finder ins Programmfenster.

Expand All @@ -51,10 +51,14 @@
![OpenStitch Micro vs. TrueType bei 2.5 und 3 mm](./assets/micro_font_comparison.png)
* **SVG-Vektor-Import** (Transformationen, Bögen, Stile, `<use>`, Füllregeln) & **TTF/OTF-Schrift-Generator** (inkl. Bogentext & automatischer Satin/Tatami-Wahl).

### 3. 🩺 Stichdichte-Wächter, Heatmap & Qualitäts-Doktor (`F7`)
* **Automatischer Anti-Fadenbruch-Filter (`density_guard`):** Verhindert Nadelkollisionen, Fadennester („Birdnesting“) und Stofflöcher.
* **Live-Stichdichte-Heatmap:** Zeigt kritische Dichtestellen farbcodiert (Grün / Gelb / Rot) auf der Leinwand.
* **Qualitäts-Doktor (`F7`):** Prüft vor dem Export Rahmen-Sicherheitsabstand, Nadelanzahl, Kurzstich-Spitzen und Fadenschnitte.
### 3. 🧪 Virtueller Probestick (`F7`)
* **Design prüfen:** Punktzahl bis 100, Befunde in Klartext, **Zeigen** springt zur Stelle, **Beheben** löst es mit einem Klick, wo das möglich ist.
* **Feste Regeln und Schätzungen, klar getrennt:** Stichlängen, Rahmengrenzen, Fadenlagen, Vernähstiche und die exportierte Datei folgen exakt aus den Stichen. Nur der Stoffzug ist eine Schätzung.
* **Stoffzug-Simulation:** zeigt, wie der Faden den gewählten Stoff zusammenzieht und wo Kontur und Füllung auseinanderlaufen können.
* **Kalibrierung mit echtem Stoff:** Einen kleinen Testbalken sticken, die Breite messen und eintragen. Simulation und Zugausgleich rechnen dann für diesen Stoff mit deinem Messwert.
* **Maschinenregeln:** zu kurze und zu lange Stiche, lose Flottungen, fehlende Vernähstiche, Nadelhäufungen, zu viele Fadenlagen, Rahmenkollision.
* **Export-Prüfung:** Dateien werden mit einem unabhängigen Parser neu eingelesen und Stich für Stich verglichen.
* **Kommandozeile:** `python -m openstitch.analysis design.dst --fabric jersey --formats`

### 4. 🏭 Herstellerneutral & Alle wichtigen Maschinenformate
* **Integrierte Maschinenprofile & Rahmen-Strategien:**
Expand All @@ -78,6 +82,12 @@ Lade dir auf der **[GitHub Release-Seite (latest)](https://github.com/lb2002/ope
* 🪟 **Windows (64-Bit Einzeldatei):** **[`OpenStitch-Studio-Windows-x64.exe`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-Windows-x64.exe)** *(einfach herunterladen & doppelklicken, kein Entpacken nötig!)*
* 🍏 **macOS (Apple Silicon M1 / M2 / M3 / M4):** **[`OpenStitch-Studio-macOS-AppleSilicon-M-Chip-arm64.zip`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-macOS-AppleSilicon-M-Chip-arm64.zip)** *(`OpenStitch Studio.app`)*
* 🍎 **macOS (Intel x64):** **[`OpenStitch-Studio-macOS-Intel-x64.zip`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-macOS-Intel-x64.zip)** *(`OpenStitch Studio.app`)*
* 🐧 **Linux (64-Bit):** **[`OpenStitch-Studio-Linux-x64.tar.gz`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-Linux-x64.tar.gz)** *(entpacken, dann `OpenStitch-Studio` starten)*

> 🍏 **Öffnen auf dem Mac:** OpenStitch ist kostenlos und nicht mit einem bezahlten Apple-Zertifikat signiert, deshalb blockiert macOS es beim ersten Mal. Verschiebe die App nach *Programme*, versuche einmal sie zu öffnen, gehe dann zu *Systemeinstellungen → Datenschutz & Sicherheit* und klicke **Trotzdem öffnen**. Meldet macOS, die App sei beschädigt, führe einmal im Terminal aus:
> ```bash
> xattr -cr "/Applications/OpenStitch Studio.app"
> ```

---

Expand Down
9 changes: 8 additions & 1 deletion README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
* 🪄 **Auto-Digitalizador (imagen / logotipo → archivo de bordado):** reducción de color en CIE-Lab, correspondencia con catálogos reales (**Madeira Polyneon 40, Isacord 40, Gunold Poly 40, Brother**), eliminación automática del fondo, detección del tipo de puntada (pespunte triple, **satén automático**, **tatami** / relleno de contorno), compensación de tirantez, entretela y solape de 0,7 mm entre colores.
* 🎨 **Digitalización manual:** herramientas Tatami (`F`), Satén (`S`), Pespunte (`R`), editor de nodos (`N`), inspector paramétrico en vivo, columnas de satén a lo largo de la línea central dibujada, fuente de bordado **OpenStitch Micro** legible desde 2,5 mm, texto TTF/OTF con arco, importación SVG y arrastrar y soltar.
* 🧵 **Herramientas pro:** modo espuma 3D (gorras), **aplique en 1 clic**, **PhotoStitch** (foto → bordado monocromo, sepia o CMYK).
* 🩺 **Control de calidad:** filtro anti-rotura de hilo, mapa de densidad en vivo, **doctor de calidad (`F7`)** y **verificación binaria** de cada archivo exportado.
* 🧪 **Prueba de bordado virtual (`F7`):** nota sobre 100, avisos en lenguaje claro con botones **Mostrar** y **Corregir**, simulación del tiro de la tela y relectura de cada archivo exportado. Es un modelo basado en reglas prácticas y no sustituye a una prueba real.
* 🧶 **Elección de tela:** algodón, vaquero, gorra, piqué, camiseta, polar, rizo, cuero, seda. La densidad y la compensación se ajustan, y se indican el estabilizador y la aguja.
* 🏭 **Neutral respecto a fabricantes:** DST, PES, EXP, JEF, VP3, U01; perfiles para Tajima, Brother, Barudan, Ricoma/ZSK, Janome/Bernina, Pfaff/Husqvarna y Melco (gestor de disquete FAT12 `.IMG` incluido).
* 🌍 **4 idiomas** conmutables al instante: 🇬🇧 🇩🇪 🇫🇷 🇪🇸.
* 📄 **Hoja de producción PDF A4:** agujas, consumo de hilo, número de puntadas y tiempo estimado.
Expand All @@ -36,6 +37,12 @@ Desde la **[página de releases (latest)](https://github.com/lb2002/openstitch/r
* 🪟 **Windows (64 bits, archivo único):** [`OpenStitch-Studio-Windows-x64.exe`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-Windows-x64.exe)
* 🍏 **macOS (Apple Silicon M1–M4):** [`OpenStitch-Studio-macOS-AppleSilicon-M-Chip-arm64.zip`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-macOS-AppleSilicon-M-Chip-arm64.zip)
* 🍎 **macOS (Intel x64):** [`OpenStitch-Studio-macOS-Intel-x64.zip`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-macOS-Intel-x64.zip)
* 🐧 **Linux (64 bits):** **[`OpenStitch-Studio-Linux-x64.tar.gz`](https://github.com/lb2002/openstitch/releases/latest/download/OpenStitch-Studio-Linux-x64.tar.gz)** *(descomprime y ejecuta `OpenStitch-Studio`)*

> 🍏 **Abrir en Mac:** OpenStitch es gratuito y no está firmado con un certificado de pago de Apple, por lo que macOS lo bloquea la primera vez. Mueve la app a *Aplicaciones*, intenta abrirla una vez, ve a *Ajustes del Sistema → Privacidad y seguridad* y pulsa **Abrir igualmente**. Si macOS dice que la app está dañada, ejecuta una vez en Terminal:
> ```bash
> xattr -cr "/Applications/OpenStitch Studio.app"
> ```

### Opción B: desde el código fuente
Requiere **Python 3.10+**.
Expand Down
Loading
Loading