diff --git a/boxes/generators/traylayout.py b/boxes/generators/traylayout.py index 7e3d75b..315dcf2 100755 --- a/boxes/generators/traylayout.py +++ b/boxes/generators/traylayout.py @@ -229,13 +229,17 @@ class Layout(Boxes): # Top edge self.edgeAt(e, posx+self.x[x], posy+t, self.x[x], -180) - self.edgeAt("e", posx, posy+t, t, -180) - self.edgeAt("e", posx+self.x[x]+t, posy+t, t, -180) + if x==0 or y==0 or not self.floors[y-1][x-1]: + self.edgeAt("e", posx, posy+t, t, -180) + if x==lx-1 or y==0 or not self.floors[y-1][x+1]: + self.edgeAt("e", posx+self.x[x]+t, posy+t, t, -180) elif y>0 and self.floors[y-1][x]: # Bottom Edge self.edgeAt(e, posx, posy, self.x[x]) - self.edgeAt("e", posx-t, posy, t) - self.edgeAt("e", posx+self.x[x], posy, t) + if x==0 or y==ly or not self.floors[y][x-1]: + self.edgeAt("e", posx-t, posy, t) + if x==lx-1 or y==ly or not self.floors[y][x+1]: + self.edgeAt("e", posx+self.x[x], posy, t) posx += self.x[x] + self. thickness posy += self.y[y-1] + self.thickness @@ -255,13 +259,17 @@ class Layout(Boxes): else: # Right edge self.edgeAt(e, posx+t, posy, self.y[y], 90) - self.edgeAt("e", posx+t, posy-t, t, 90) - self.edgeAt("e", posx+t, posy+self.y[y], t, 90) + if x==lx or y==0 or not self.floors[y-1][x]: + self.edgeAt("e", posx+t, posy+self.y[y], t, 90) + if x==lx or y==ly-1 or not self.floors[y+1][x]: + self.edgeAt("e", posx+t, posy-t, t, 90) elif x < lx and self.floors[y][x]: # Left edge self.edgeAt(e, posx, posy+self.y[y], self.y[y], -90) - self.edgeAt(e, posx, posy+self.y[y]+t, t, -90) - self.edgeAt(e, posx, posy, t, -90) + if x==0 or y==0 or not self.floors[y-1][x-1]: + self.edgeAt("e", posx, posy+self.y[y]+t, t, -90) + if x==0 or y==ly-1 or not self.floors[y+1][x-1]: + self.edgeAt("e", posx, posy, t, -90) posy += self.y[y] + self.thickness if x < lx: posx += self.x[x] + self.thickness diff --git a/documentation/src/TODO.rst b/documentation/src/TODO.rst index 8a374f5..0ca6120 100644 --- a/documentation/src/TODO.rst +++ b/documentation/src/TODO.rst @@ -22,7 +22,6 @@ Generators * Fix traylayout - * Inner corners of the floor * Move bottom edges of walls without floor underneeth to E * Make bolts configurable (e.g. box2.py)