4 // ./quacks-ingredients-update-levels && make sewing-table.scad poster-tube-lid-parametric.scad
5 // make quacks-stls -j8 2>&1 | tee log
7 // ./quacks-ingredients-make-copy-gcodes Yellow etc.
11 spot_gap = spot_dia / 3.0;
15 multicolour_gap = 0.075; // each side
16 initial_layer_thick = 0.400;
17 initial_layer_width = 0.750;
18 final_layer_thick = 0.500;
26 token_pitch = token_dia + 3;
30 $spots_absent = false;
31 $spots_plusgap = false;
33 module Spots_Extrude_Lower(){
34 d = $spots_plusgap ? 1 : 0;
36 linear_extrude(height= initial_layer_thick + d)
40 module Spots_Extrude_Upper(){
41 d = $spots_plusgap ? 1 : 0;
42 translate([0,0, thick + d])
44 linear_extrude(height= final_layer_thick + d)
48 module SpotAt(condition, xy) {
49 if (condition == !$spots_absent) {
50 translate(xy * (spot_gap + spot_dia) * sqrt(0.5))
51 circle(r= spot_dia/2 +
52 ($spots_plusgap ? multicolour_gap : 0));
57 SpotAt(($nspots % 2) > 0, [0,0]);
58 SpotAt($nspots >= 2, [ 1, 1]);
59 SpotAt($nspots >= 2, [-1,-1]);
60 SpotAt($nspots >= 4, [ 1,-1]);
61 SpotAt($nspots >= 4, [-1, 1]);
64 module Token_Spots_All(){
81 $spots_plusgap = true;
83 linear_extrude(height=thick)
84 circle(r=token_dia/2);
85 Spots_Extrude_Lower() Token_Spots_All();
86 Spots_Extrude_Upper() Token_Spots_All();
101 module Frame(phase, base_sz) {
102 zs = [ initial_layer_thick,
108 sz = base_sz + phase * initial_layer_width * 2 * [1,1];
109 linear_extrude(height= initial_layer_thick) {
111 square(center=true, sz + initial_layer_width * 2 * [1,1]);
112 square(center=true, sz);
116 translate([-base_sz[0]/2, (2.8-phase)*(multicolour_post*1.7)])
117 linear_extrude(height= zs[phase-1])
118 square(multicolour_post);
122 for ($nspots = [1,2,3,4]) {
123 translate(($nspots - 2) * token_pitch * [1,0])
128 module Tests_L() { ////toplevel
129 Frame($phase, token_dia * [ 6, 1.5 ]);
134 include <quacks-ingredients-counts.scad>