3D-Höeninformations-Handler jetzt auch in nicht-iterativer Methodik

This commit is contained in:
2025-06-30 14:57:06 +02:00
parent 3f359486f9
commit 24fd45e6ae
+15 -9
View File
@@ -355,16 +355,22 @@ def get_rack_positions(msp):
rack_counter = 1 #Zaehler für Rack Nummerierung
all_layers = list(config.items('GetPos-Layer_Racks'))
for (layer,v) in all_layers:
selectstr = f'LWPOLYLINE[layer=="{layer}"]'
for e in msp.query(selectstr):
#print_polyline(e)
for layer, _ in all_layers:
# Suche nach LWPOLYLINE
lw_query = f'LWPOLYLINE[layer=="{layer}"]'
for entity in msp.query(lw_query):
rack_key = f"Rack_{rack_counter}"
ret[rack_key] = list()
for x, y, z, start_width, end_width, bulge in e.get_points(): # Gibt Tuple (x, y, start_width, end_width, bulge)
p = [round(x,1), round(y,1), round(z,1)]
ret[rack_key].append(p)
rack_counter +=1
handle_lwpolyline(entity, rack_key, ret)
rack_counter += 1
# Suche nach klassischer POLYLINE
pl_query = f'POLYLINE[layer=="{layer}"]'
for entity in msp.query(pl_query):
rack_key = f"Rack_{rack_counter}"
handle_polyline(entity, rack_key, ret)
rack_counter += 1
return ret
def get_rack_positions_iter(dxf_path):