fix graph building error if only one stair is present on a level
This commit is contained in:
parent
1ed107ba4b
commit
06aec21669
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ class GraphRoom():
|
||||||
def prepare_build(self):
|
def prepare_build(self):
|
||||||
self.mpl_clear = shapely_to_mpl(self.clear_geometry.buffer(0.01, join_style=JOIN_STYLE.mitre))
|
self.mpl_clear = shapely_to_mpl(self.clear_geometry.buffer(0.01, join_style=JOIN_STYLE.mitre))
|
||||||
self.mpl_stairs = ()
|
self.mpl_stairs = ()
|
||||||
for stair_line in self.level.level.geometries.stairs:
|
for stair_line in assert_multilinestring(self.level.level.geometries.stairs):
|
||||||
coords = tuple(stair_line.coords)
|
coords = tuple(stair_line.coords)
|
||||||
self.mpl_stairs += tuple((Path(part), coord_angle(*part)) for part in zip(coords[:-1], coords[1:]))
|
self.mpl_stairs += tuple((Path(part), coord_angle(*part)) for part in zip(coords[:-1], coords[1:]))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue