From 4595d9b5628c3e4ebbff59452903d58efb27c361 Mon Sep 17 00:00:00 2001
From: Paul Wolok
Date: Thu, 4 Sep 2025 08:37:06 +0200
Subject: [PATCH] =?UTF-8?q?updated=20requirements,=20Der=20ursprungspunkt?=
=?UTF-8?q?=20der=20Bl=C3=B6cke=20wurde=20ver=C3=A4ndert,=20die=20virtuell?=
=?UTF-8?q?e=20Umgebung=20wurde=20nicht=20richtig=20geladen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bin/svg2dxf.bat | 9 +++------
lib/plant2dxf.py | 6 ++++++
lib/requirements.txt | 1 +
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/bin/svg2dxf.bat b/bin/svg2dxf.bat
index a8ba4c8..1ff866e 100644
--- a/bin/svg2dxf.bat
+++ b/bin/svg2dxf.bat
@@ -1,10 +1,7 @@
@echo off
-REM ~dp0 steht für das Verzeichnis, in der diese Datei liegt
-
-call setenv.bat
-
REM Beispielaufruf mit Parametern:
REM --in: Ordner mit .svg bzw. .xml-Dateien (optional. Standard: data/svg)
REM --out: Zielverzeichnis (optional. Standard: work/converted_dxfs)
-
-python %PROJECT_LIB%\svg2dxf.py %*
\ No newline at end of file
+CALL manage_interpreter.bat activate_interpreter
+python %PROJECT_LIB%\svg2dxf.py %*
+CALL manage_interpreter.bat deactivate_interpreter
\ No newline at end of file
diff --git a/lib/plant2dxf.py b/lib/plant2dxf.py
index d0b095a..b582829 100644
--- a/lib/plant2dxf.py
+++ b/lib/plant2dxf.py
@@ -323,7 +323,12 @@ def handle_omniflo(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols)
print(f"[WARN] Omniflo-Block '{blockname}' nicht in Bibliothek {lib_doc.filename}. Überspringe {teileid}.")
return
import_block(blockname, lib_doc, doc)
+ lib_block = lib_doc.blocks.get(blockname)
+ imported_block = doc.blocks.get(blockname)
+ if hasattr(lib_block.block.dxf, "base_point"):
+ imported_block.block.dxf.base_point = lib_block.block.dxf.base_point
if merkmale.get("Drehung")== 0:
+
bref = msp.add_blockref(blockname, (x, y), dxfattribs={"xscale": 1.0, "yscale":1.0,"rotation": merkmale.get("Drehung")})
else:
@@ -365,6 +370,7 @@ def main(csv_path: Path, lib_path: Path, cfg_path: Path,
# Neue Zielzeichnung (DXF R2018)
doc = ezdxf.new(dxfversion="R2018")
+ doc.header['$INSUNITS'] = 4 # Millimeter
msp = doc.modelspace()
# Höhe bestimmen für Koordinaten-Transformation
diff --git a/lib/requirements.txt b/lib/requirements.txt
index 9cdb0fe..2902cfd 100644
--- a/lib/requirements.txt
+++ b/lib/requirements.txt
@@ -1 +1,2 @@
ezdxf==1.4.1
+svg.path==7.0
\ No newline at end of file