X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=quacks-ingredients.scad;h=6925a1b8cc34ca3f4b314ad550aafe983959a689;hb=46fb2db6a0757b63f9eb0cd44956f69e5196be1e;hp=e54aa1f884190dc414aaf82859d64ab03bc59a67;hpb=2a343f4e9c401a01858cf31f1cd1e4b7f06db797;p=reprap-play.git diff --git a/quacks-ingredients.scad b/quacks-ingredients.scad index e54aa1f..6925a1b 100644 --- a/quacks-ingredients.scad +++ b/quacks-ingredients.scad @@ -1,23 +1,44 @@ // -*- C -*- -token_dia = 18; -spot_dia = 4; +// +// git clean -xdff +// ./quacks-ingredients-update-levels +// make autoincs +// +// make -j8 quacks-stls 2>&1 | tee log +// OR EG +// make -j8 quacks-ingredients-L{1,2,3,4,5},Base_Yellow.auto.stl +// +// ./quacks-ingredients-make-copy-gcodes Base_Yellow etc. +// +// Print Q-P-1 in spots, Q-P-2 in main colour, Q-P-3 in spots +// +// For colours which only have zero-spot counters, print only Q-P-2 + +token_dia = 20; +spot_dia = 4.3; spot_gap = spot_dia / 3.0; -thick = 1.5; +thick = 3.0; -multicolour_gap = 0.15; // each side +multicolour_gap = 0.075; // each side initial_layer_thick = 0.400; -//initial_layer_width = 0.750; -final_layer_thick = 0.250; - -$nspots = 3; -$spots_absent = false; -$spots_plusgap = false; +initial_layer_width = 0.750; +final_layer_thick = 0.500; +multicolour_post = 4; $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]) @@ -35,11 +56,9 @@ module Spots_Extrude_Upper(){ module SpotAt(condition, xy) { if (condition == !$spots_absent) { - echo(condition, $spots_absent, "Y"); translate(xy * (spot_gap + spot_dia) * sqrt(0.5)) - circle(r= spot_dia/2); - } else { - echo(condition, $spots_absent, "N"); + circle(r= spot_dia/2 + + ($spots_plusgap ? multicolour_gap : 0)); } } @@ -88,33 +107,39 @@ module Token_L5(){ Token_Spots(); } -module Demo(){ ////toplevel - color("red") { Token_L3(); } - color("white") { Token_L1(); Token_L5(); } - color("black") { Token_L2(); Token_L4(); } +module Frame(phase, base_sz) { + zs = [ initial_layer_thick, + initial_layer_thick, + thick, + thick, + thick ]; + + sz = base_sz + phase * initial_layer_width * 2 * [1,1]; + linear_extrude(height= initial_layer_thick) { + difference(){ + square(center=true, sz + initial_layer_width * 2 * [1,1]); + square(center=true, sz); + } + } + // Priming tower + translate([-base_sz[0]/2, (2.8-phase)*(multicolour_post*1.7)]) + linear_extrude(height= zs[phase-1]) + square(multicolour_post); } module Tests(){ for ($nspots = [1,2,3,4]) { - translate(($nspots - 2) * (token_dia + 3) * [1,0]) + translate(($nspots - 2) * token_pitch * [1,0]) children(); } } -module Test_L1(){ ////toplevel - Tests() Token_L1(); -} -module Test_L2(){ ////toplevel - Tests() Token_L2(); -} -module Test_L3(){ ////toplevel - Tests() Token_L3(); -} -module Test_L4(){ ////toplevel - Tests() Token_L4(); -} -module Test_L5(){ ////toplevel - Tests() Token_L5(); +module Tests_L() { ////toplevel + Frame($phase, token_dia * [ 6, 1.5 ]); + Tests() Token_L(); } +//// toplevels-from: +include + //Demo();