Drehung des Blocks korrigiert
This commit is contained in:
+8
-7
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user