Drehung des Blocks korrigiert

This commit is contained in:
2025-09-05 10:14:04 +02:00
115 changed files with 5632711 additions and 36637 deletions
+8 -7
View File
@@ -329,16 +329,17 @@ def handle_omniflo(msp, teileid, merkmale, x, y, doc, lib_doc, verbose, symbols)
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-16.28, y), dxfattribs={"xscale": 1.0, "yscale":1.0,"rotation": merkmale.get("Drehung") })
else:
bref = msp.add_blockref(blockname, (x-16.28, y), dxfattribs={
"xscale": 1.0, "yscale": 1.0, "rotation": merkmale.get("Drehung") - 180})
drehung = merkmale.get("Drehung")
if drehung not in (0.0, 180.0):
drehung = drehung -180
bref = msp.add_blockref(blockname, (x, y), dxfattribs={"xscale": 1.0, "yscale":1.0,"rotation": drehung })
bref.add_attrib(
tag= "NAME",
text= "Hallo Welt"
text= merkmale.get("bezeichner"),
insert = (x,y),
invisible =True
)
bref.add_auto_attribs({ATTR_TAG: teileid})