Layer 0 in config aufgenommen. Dort waren die Rahmen, easy.json nicht mehr mit im Versionsverwaltungssystem verwalten. Kann leicht aus easy.dxf gewonnen werden.

This commit is contained in:
2025-05-30 19:09:58 +02:00
parent dec2898fb2
commit 6fef1c5f5a
6 changed files with 75 additions and 201 deletions
+9 -7
View File
@@ -50,22 +50,24 @@ def get_input_positions(msp: ezdxf.document.Drawing.modelspace):
id = ""
ld = dict()
for attrib in insert.attribs:
attr_tag = attrib.dxf.tag
attr_text = attrib.dxf.text
if len(insert.attribs) == 0:
continue # Überspringe Blöcke ohne Attribute
#print(f"Attribut Name: {attrib.dxf.tag}, Wert: {attrib.dxf.text}")
ld[attrib.dxf.tag] = attrib.dxf.text
if attrib.dxf.tag == "IO":
id = attrib.dxf.text
ld[attr_tag] = attr_text
if attr_tag == "IO":
id = attr_text
#print(f"-- coord io {id}--: {attrib.dxf.insert}") # position des Blocks
pos = attrib.dxf.insert #Position aufzeichnen und bei Bedarf später mit REAL_POS überschreiben
ld["pos"] = (round(pos.x, 1), round(pos.y, 1))
if attrib.dxf.tag == "B":
if attr_tag == "B":
for spec in SpecialKeys:
if spec in attrib.dxf.text:
id = attrib.dxf.text
if spec in attr_text:
id = attr_text
#print(f"-- coord {attrib.dxf.text} --: {attrib.dxf.insert}")
if attrib.dxf.tag == "REALE_POSITION" and attrib.dxf.text == "x":
if attr_tag == "REALE_POSITION" and attr_text == "x":
#print(f"-- coord real --: {attrib.dxf.insert}")
pos = attrib.dxf.insert #Position Ecke unten links von "x"-Marker auslesen