Einlesen der Dateien in routing.py angepasst, sodass plant.py Daten verarbeiten kann.
This commit is contained in:
+4
-6
@@ -7,6 +7,7 @@ import sys
|
||||
import math
|
||||
import json
|
||||
import re
|
||||
from shapely import Point
|
||||
|
||||
|
||||
"""
|
||||
@@ -132,13 +133,10 @@ def get_rack_positions(msp):
|
||||
for e in msp.query('LWPOLYLINE[layer=="PRITSCHE_200-60"]'):
|
||||
#print_polyline(e)
|
||||
rack_key = f"Rack_{rack_counter}"
|
||||
ret[rack_key] = dict()
|
||||
|
||||
node_counter = 1
|
||||
ret[rack_key] = list()
|
||||
for x, y, start_width, end_width, bulge in e.get_points(): # Gibt Tuple (x, y, start_width, end_width, bulge)
|
||||
node_key = f"Node_{node_counter}"
|
||||
ret[rack_key][node_key] = [round(x,1), round(y,1)]
|
||||
node_counter +=1
|
||||
p = [round(x,1), round(y,1)]
|
||||
ret[rack_key].append(p)
|
||||
rack_counter +=1
|
||||
# iterate over all entities in modelspace
|
||||
# for e in msp:
|
||||
|
||||
Reference in New Issue
Block a user