[200] DXF-Export: Klassen-Stil aufgelöst (Linien ohne eigene Farbe), Stifte in Blöcken, Textfarbe

This commit is contained in:
Claude committed 2026-11-13 22:25:46 +00:00
1 parent 9c2d7e3d07
commit f6aba1caeb
7 files changed
+223 -31

No files matched your search

+10 -1
View File
@@ -93,9 +93,18 @@ def main(path: str) -> int:
blocks = {}
for b in doc.blocks:
n = {}
pens = []
for be in b:
n[be.dxftype()] = n.get(be.dxftype(), 0) + 1
blocks[b.name] = {"entities": n, "anonymous": b.name.startswith("*D")}
# [200] Stift der Blockinhalte: eigene Farbe (420) und Strichstärke (370), sonst nach Ebene.
pens.append(
{
"type": be.dxftype(),
"trueColor": list(be.rgb) if be.dxf.hasattr("true_color") and be.dxftype() != "HATCH" else None,
"lineweight": be.dxf.lineweight if be.dxf.hasattr("lineweight") else None,
}
)
blocks[b.name] = {"entities": n, "anonymous": b.name.startswith("*D"), "pens": pens}
styles = {st.dxf.name: (st.dxf.font if st.dxf.hasattr("font") else None) for st in doc.styles}
ttf = {}
for st in doc.styles: