improve graph building for complicated stair situations

This commit is contained in:
Laura Klünder 2016-12-09 02:50:02 +01:00
parent 4a3bebac36
commit cfd6f51978

View file

@ -85,7 +85,7 @@ class GraphRoom():
for segment in zip(coords[:-1], coords[1:]): for segment in zip(coords[:-1], coords[1:]):
path = Path(segment) path = Path(segment)
length = abs(np.linalg.norm(path.vertices[0] - path.vertices[1])) length = abs(np.linalg.norm(path.vertices[0] - path.vertices[1]))
for coord in tuple(path.interpolated(max(int(length / 1.0), 1)).vertices)[start:-1]: for coord in tuple(path.interpolated(max(int(length / 1.0), 2)).vertices)[start:-1]:
self.add_point(coord) self.add_point(coord)
start = 0 start = 0