DividerTray: Fix height if "outside" and "bottom" is selected
Thanks to https://github.com/nialabert for reporting! Resolves: #413
This commit is contained in:
parent
bf84ee1e73
commit
574f72e6e4
|
@ -112,8 +112,11 @@ class DividerTray(Boxes):
|
||||||
if side_walls_number == 0:
|
if side_walls_number == 0:
|
||||||
raise ValueError("You need at least one side wall to generate this tray")
|
raise ValueError("You need at least one side wall to generate this tray")
|
||||||
|
|
||||||
# If measures are inside, we need to adjust height before slot generation
|
# We need to adjust height before slot generation
|
||||||
if not self.outside:
|
if self.outside:
|
||||||
|
if self.bottom:
|
||||||
|
self.h -= self.thickness
|
||||||
|
else:
|
||||||
# If the parameter 'h' is the inner height of the content itself,
|
# If the parameter 'h' is the inner height of the content itself,
|
||||||
# then the actual tray height needs to be adjusted with the angle
|
# then the actual tray height needs to be adjusted with the angle
|
||||||
self.h = self.h * math.cos(math.radians(self.Slot_angle))
|
self.h = self.h * math.cos(math.radians(self.Slot_angle))
|
||||||
|
|
Loading…
Reference in New Issue