0f02fd83aaa5b0908465dbc5e113a3ca00ba76b2
Replaces the generic marker with one shape per type, so the types are distinguishable in the drawing without relying on colour. The shape belongs to the type, so it sits in tro_catalog next to the colour - colour groups (6 groups), shape identifies (10 types): 1Sep circle 1Sep1Swi triangle 1Sep2Swi pentagon 1Sep_SSCC 2 circles Vario rectangle Vario_workStation hexagon PinStore_Auto square EmptyCarrBuffer diamond LoadingBoom arrow 2Sep1Swi triangle down The visible attributes are now ID and TYPE, as those are what the dialog edits; FB_BLOCK stays visible under --fb and ITEMS/CONFIDENCE/SEPARATORS stay hidden data. Note this renames the former TRO_ID/TRO_TYPE tags, so drawings annotated with an earlier version need regenerating. Marker layers now take the *stroke* colour instead of the fill. A CAD symbol is line work, and the pastel fills of the palette were nearly invisible as lines - LoadingBoom in particular came out almost white on white. cad/tro_edit.dcl and cad/tro_edit.lsp add the TROEDIT command: pick a TRO_SYM_* block, edit ID and TYPE, write back on OK. TYPE is a picklist rather than free text so it cannot drift from the catalogue; the list comes from cad/tro_types.lsp, which "tro_annotate.py --emit-lisp" generates from TRO_CATALOG. If that file is missing the dialog degrades to the block's current type instead of failing. The dialog deliberately changes attributes only. The marker shape belongs to the block definition of the type and FB_BLOCK is derived from it, so both follow on the next annotation run - the dialog says so, and TROEDIT prints a reminder when the type was changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sps_skel
Das Programm erhält ein mechanische Layout von der Projektierung oder Angebotswesen zusammen mit dem elektronischen Layout mit der Liste aller Sensoren, Stopper, etc. Daraus erstellt es dann ein Skelett für die SPS Programmierung, welches direkt ins TIA Portal importiert werden kann.
Projektstruktur
sps_skel/
bin/ Skripte zur Umgebungsverwaltung
setenv.bat/.sh Umgebungsvariablen setzen
install_py.bat/.sh venv erstellen + pip install
activate_venv.bat/.sh venv aktivieren
get_cmd.bat/.sh Shell mit Umgebung oeffnen
cfg/ Konfigurationsdateien (INI/JSON)
data/ Eingabedaten (nicht im Git)
doc/ Dokumentation
examples/ Beispieldateien
lib/ Python-Quellcode / Bibliothek
log/ Log-Dateien (nicht im Git)
results/ Ergebnisse / Ausgaben (nicht im Git)
tests/ Unit Tests
.gitignore
LICENSE
README.md
requirements.txt
Umgebungsvariablen
| Variable | Beschreibung |
|---|---|
SPS_SKEL |
Wurzelverzeichnis |
SKEL_BIN |
Skriptverzeichnis |
SKEL_LIB |
Python-Quellcode |
SKEL_CFG |
Konfigurationsdateien |
SKEL_DATA |
Eingabedaten |
SKEL_LOG |
Log-Dateien |
SKEL_RESULTS |
Ergebnisse |
SKEL_EXAMPLES |
Beispieldateien |
PYTHONPATH |
Erweitert um SKEL_LIB |
Installation
Voraussetzungen
- Python 3.10 oder hoeher
Setup (Windows)
bin\install_py.bat
Setup (Linux / macOS)
bash bin/install_py.sh
Nutzung
Umgebung setzen
bin\setenv.bat # Windows
source bin/setenv.sh # Linux / macOS
Shell mit gesetzten Variablen oeffnen
bin\get_cmd.bat # Windows
source bin/get_cmd.sh # Linux / macOS
venv aktivieren
bin\activate_venv.bat # Windows
source bin/activate_venv.sh # Linux / macOS
Lizenz
MIT License - siehe LICENSE
Autor
Michael Stangl (GitHub: mistamichael)
Languages
Python
92%
Shell
4%
Batchfile
3.9%
Common Lisp
0.1%