1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-23 15:43:39 +02:00

Single backtick now used for all code quotes.

This commit is contained in:
Chris Palmer
2020-12-24 16:04:59 +00:00
parent 04b98a3786
commit 4cac382581
49 changed files with 2459 additions and 2459 deletions

View File

@@ -22,11 +22,11 @@
//
include <../global_defs.scad>
function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the ```i```th item
function layout_offset(widths, i, gap = 2) = //! Calculate the offset for the `i`th item
i == 0 ? widths[0] / 2
: layout_offset(widths, i - 1, gap) + widths[i - 1] / 2 + gap + widths[i] / 2;
module layout(widths, gap = 2, no_offset = false) //! Layout children passing ```$i```
module layout(widths, gap = 2, no_offset = false) //! Layout children passing `$i`
translate([no_offset ? -widths[0] / 2 : 0, 0])
for($i = [0 : 1 : len(widths) - 1])
translate([layout_offset(widths, $i, gap), 0])