TrayLayout: Error out if tray is just a single wall

This commit is contained in:
Florian Festi 2020-02-01 14:51:38 +01:00
parent f8401aac75
commit 2121228036
1 changed files with 4 additions and 0 deletions

View File

@ -406,6 +406,10 @@ class TrayLayout2(TrayLayout):
lx = len(x)
ly = len(y)
if lx == 0:
raise ValueError("Need more than one wall in x direction")
if ly == 0:
raise ValueError("Need more than one wall in y direction")
if len(hwalls) != ly + 1:
raise ValueError("Wrong number of horizontal wall lines: %i (%i expected)" % (len(hwalls), ly + 1))
for nr, walls in enumerate(hwalls):