3D polylinine werden im Routing berücksichtigt

This commit is contained in:
2025-06-30 16:43:50 +02:00
parent 5258457851
commit e5ca9561dd
2 changed files with 62 additions and 20 deletions
+7 -1
View File
@@ -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"]