From f9d127cbafa9a6fc3c606246abf939d84a450fc1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 18 Jun 2017 15:16:09 +0100 Subject: [PATCH] commitid-cube-test: X, wip adjust? --- commitid-cube-test-X.scad | 76 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 commitid-cube-test-X.scad diff --git a/commitid-cube-test-X.scad b/commitid-cube-test-X.scad new file mode 100644 index 0000000..0816001 --- /dev/null +++ b/commitid-cube-test-X.scad @@ -0,0 +1,76 @@ +// -*- C -*- + +include + +baseh= 1; + +sz = 20; + +fdo = [1, 3, 0]; + +$Commitid_depth = 0.8; + +module FD () { + translate(fdo) + Commitid_FontDemo(); +} + +module TC () { ////toplevel + difference(){ + cube([sz,sz,sz]); + translate([0,0, sz]) mirror([0,0,1]) FD(); + rotate([90,0,0]) translate([0,0,0]) FD(); + translate([sz,0,0]) mirror([1,0,0]) rotate([90,0,90]) FD(); + translate([sz,sz,0]) rotate([0,0,180]) FD(); + } + translate([sz,sz,0]) rotate([-90,0,0]) rotate([0,0,180]) FD(); + translate([0,sz,0]) rotate([-90,0,90]) rotate([0,0,180]) FD(); +} + +w = 3; +t = 4; + +fdsz = Commitid_FontDemo_sz(); +d = Commitid_depth(); +ru = Commitid_pixelsz(); + +module TTWall () { + difference(){ + translate([0, 0, -0.1]) + cube([w, sz, sz - 2 + 0.1]); + + translate([0,sz,0]) rotate([90,0,-90]) FD(); + translate([0, sz, 0]) + rotate([90, 0, -90]) + translate(fdo + [0, -ru*2, -d]) cube([fdsz[0], ru, d*2]); + } + translate([w,0,0]) rotate([90,0,90]) FD(); + + translate([0, sz+d, 0]) + rotate([90,0,0]) + translate([0, fdo[1], 0]) cube([d*2, fdsz[1], ru]); +} + +module TT () { ////toplevel + difference(){ + translate([-sz, 0, -t]) + cube([sz*2 + w, sz, t]); + + translate([0,0,-t]) rotate([0,180,0]) FD(); + translate([w,0,0]) rotate([0,0,0]) FD(); + + translate([(sz+w), 0, -t]) rotate([0,180,0]) + Commitid_BestCount([sz+w, sz]); + } + translate([-sz,0,0]) rotate([0,0,0]) FD(); + + TTWall(); + translate([0,0,-t]) rotate([90,0,0]) TTWall(); +} + +echo("pixelsz:", str(Commitid_pixelsz()), + "depth:", Commitid_depth(), + "sz:", Commitid_FontDemo_sz()); + +//TC(); +TT(); -- 2.30.2