From 265b5ab555f3243940565cd6155187977d67c6de Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Sat, 27 Jun 2020 20:00:47 +0100 Subject: [PATCH] Fixed layout to work with an empty list. --- utils/layout.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/layout.scad b/utils/layout.scad index 8945427..ffdb979 100644 --- a/utils/layout.scad +++ b/utils/layout.scad @@ -28,6 +28,6 @@ function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the `` module layout(widths, gap = 2, no_offset = false) //! Layout children passing ```$i``` translate([no_offset ? -widths[0] / 2 : 0, 0]) - for($i = [0 : len(widths) - 1]) + for($i = [0 : 1 : len(widths) - 1]) translate([layout_offset(widths, $i, gap), 0]) children();