From 4d5f4bfa457ff091851f5870a657f69ec07074db Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Fri, 2 Aug 2024 23:45:55 +0200 Subject: [PATCH] Limit lip for "ontop" lid to corners This avoids colliding with inner walls (if there are any). Resolves: #681 --- boxes/lids.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boxes/lids.py b/boxes/lids.py index 6a8b8781..f9bb16c6 100644 --- a/boxes/lids.py +++ b/boxes/lids.py @@ -98,10 +98,10 @@ def __call__(self, x: float, y: float, edge=None) -> bool: self.rectangularWall(y2, self.height, b + "fFf", ignore_widths=[1, 2, 5, 6], move="up") if style == "ontop": - self.rectangularWall(y - self.play, height + 2*t, "eeee", - move="up") - self.rectangularWall(y - self.play, height + 2*t, "eeee", - move="up") + for _ in range(4): + self.polygonWall( + (2*t, (90, t), t+self.height, 90, 4*t, 90, + t+self.height, (90, t)), "e", move="up") else: return False