Add --tosvg switch to render seating as SVG, plus test images and docs

Sitzplatzverteilung.alsSVG() (libs/Strukturdaten.py) draws tables as
white circles and people as colored circles inside their table's
circle, colored by group membership. Table radius is derived from
the number of seats so all person-circles fit without touching; the
table-to-table grid spacing is derived from the largest table radius
so tables never overlap regardless of their Koordinaten values.

libs/platz.py gains a --tosvg switch that writes
<indir>/Sitzplatzverteilung.svg alongside the existing text/CSV
output.

The three unittest scenarios now each write their rendering to
doc/images/, and doc/docu_tests.md explains the three configurations
and what each test actually verifies (including why the "split
groups land on true neighbor tables" property only holds for a
specifically chosen seed in the circle scenario, not in general).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Michael Stangl
2026-07-09 12:55:32 +02:00
parent 0232e54f37
commit 74e08f389c
9 changed files with 292 additions and 4 deletions
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="331.6" height="90.4" viewBox="0 0 331.6 90.4">
<rect width="100%" height="100%" fill="white"/>
<circle cx="45.2" cy="45.2" r="35.2" fill="white" stroke="black" stroke-width="1.5"/>
<text x="45.2" y="8" text-anchor="middle" font-size="10" fill="black">Tisch 1</text>
<circle cx="45.2" cy="32" r="12" fill="#e6194b" stroke="black" stroke-width="1"/>
<circle cx="45.2" cy="58.4" r="12" fill="#e6194b" stroke="black" stroke-width="1"/>
<circle cx="125.6" cy="45.2" r="35.2" fill="white" stroke="black" stroke-width="1.5"/>
<text x="125.6" y="8" text-anchor="middle" font-size="10" fill="black">Tisch 2</text>
<circle cx="125.6" cy="32" r="12" fill="#e6194b" stroke="black" stroke-width="1"/>
<circle cx="125.6" cy="58.4" r="12" fill="#e6194b" stroke="black" stroke-width="1"/>
<circle cx="206" cy="45.2" r="35.2" fill="white" stroke="black" stroke-width="1.5"/>
<text x="206" y="8" text-anchor="middle" font-size="10" fill="black">Tisch 3</text>
<circle cx="206" cy="32" r="12" fill="#3cb44b" stroke="black" stroke-width="1"/>
<circle cx="206" cy="58.4" r="12" fill="#3cb44b" stroke="black" stroke-width="1"/>
<circle cx="286.4" cy="45.2" r="35.2" fill="white" stroke="black" stroke-width="1.5"/>
<text x="286.4" y="8" text-anchor="middle" font-size="10" fill="black">Tisch 4</text>
<circle cx="286.4" cy="32" r="12" fill="#3cb44b" stroke="black" stroke-width="1"/>
<circle cx="286.4" cy="58.4" r="12" fill="#3cb44b" stroke="black" stroke-width="1"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB