3D polylinine werden im Routing berücksichtigt
This commit is contained in:
+7
-1
@@ -5,11 +5,13 @@ import heapq
|
||||
import math
|
||||
import matplotlib.pyplot as plt
|
||||
import networkx as nx
|
||||
import shapely
|
||||
from shapely.geometry import LineString, Point
|
||||
from shapely.ops import nearest_points
|
||||
from plant import Anlage
|
||||
import configparser
|
||||
|
||||
|
||||
# Funktionen
|
||||
def load_json(jsonfilename):
|
||||
with open(jsonfilename, encoding='utf-8') as fh:
|
||||
@@ -127,7 +129,11 @@ def prepare_data(rawdata:dict):
|
||||
for rname,lp in racks.items():
|
||||
ltemp = list()
|
||||
for p in lp:
|
||||
ltemp.append(Point(p))
|
||||
if len(p) == 3:
|
||||
pt = Point(p[0], p[1], p[2])
|
||||
else:
|
||||
pt = Point(p[0], p[1], 0.0)
|
||||
ltemp.append(pt)
|
||||
dracks[rname] = ltemp
|
||||
|
||||
mapping = rawdata["mappings"]
|
||||
|
||||
Reference in New Issue
Block a user