From 80dd0478393a096fd9cc9a7d0883908d77afae82 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 Feb 2020 21:00:28 +0000 Subject: [PATCH] quacks-ingredients: slight refactoring nfc Signed-off-by: Ian Jackson --- quacks-ingredients.scad | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/quacks-ingredients.scad b/quacks-ingredients.scad index 50b38e0..33ba5fb 100644 --- a/quacks-ingredients.scad +++ b/quacks-ingredients.scad @@ -12,12 +12,18 @@ initial_layer_width = 0.750; final_layer_thick = 0.250; multicolour_post = 4; -$spots_absent = false; -$spots_plusgap = false; - $fs=0.1; $fa=1; +// calculated + +token_pitch = token_dia + 3; + +// autoadjusted + +$spots_absent = false; +$spots_plusgap = false; + module Spots_Extrude_Lower(){ d = $spots_plusgap ? 1 : 0; translate([0,0,-d]) @@ -108,7 +114,7 @@ module Frame(phase, base_sz) { module Tests(){ for ($nspots = [1,2,3,4]) { - translate(($nspots - 2) * (token_dia + 3) * [1,0]) + translate(($nspots - 2) * token_pitch * [1,0]) children(); } } -- 2.30.2