From 67bd25016bd4cc77720ba29e09d020df239f79d0 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 21 Mar 2022 17:53:30 +0100 Subject: [PATCH] DividerTray: Add a bit of play to the dividers Especially the divider over the whole width can use some play for the slots to avoid them clamping onto the walls. Related: #374 --- boxes/generators/dividertray.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/boxes/generators/dividertray.py b/boxes/generators/dividertray.py index d254681..fcdf79c 100644 --- a/boxes/generators/dividertray.py +++ b/boxes/generators/dividertray.py @@ -252,9 +252,10 @@ class DividerTray(Boxes): upper_radius = self.divider_upper_notch_radius lower_radius = self.divider_lower_notch_radius + play = 0.05 * self.thickness # Upper: first tab width - self.edge(first_tab_width) + self.edge(first_tab_width - play) for nr, width in enumerate(widths): if nr > 0: @@ -280,7 +281,7 @@ class DividerTray(Boxes): self.polyline( # Upper: second tab width if needed - second_tab_width, + second_tab_width - play, # First side, with tab depth only if there is 2 walls 90, self.slot_depth, @@ -291,17 +292,17 @@ class DividerTray(Boxes): 90) # Lower edge for width in reversed(widths[1:]): - self.polyline(width, 90, + self.polyline(width - 2 * play, 90, height - self.slot_depth, -90, - self.thickness, + self.thickness + 2 * play, -90, height - self.slot_depth, 90) self.polyline( # Second side tab - widths[0], + widths[0] - 2 * play, 90, height - self.slot_depth, -90,