chiark / gitweb /
filamentspool: wip numbers scale
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 9 Feb 2016 20:43:36 +0000 (20:43 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 9 Feb 2016 20:43:36 +0000 (20:43 +0000)
filamentspool.scad

index dd112d2..68c2b4d 100644 (file)
@@ -207,6 +207,12 @@ wingthick=3;
 armendwallthick=selsz(2.5, 1.8, 2.5);
 armendbasethick=selsz(1.2, 1.2, 1.2);
 
+numbers_relief = 0.7;
+numbers_tick_len = 8;
+numbers_tick_width = 0.75;
+numbers_tick_linespc = 1.0;
+numbers_height_allow = 8;
+
 axlehorizoffset = 12.5;
 axlevertheight = 100;
 towercliph = 16;
@@ -271,20 +277,25 @@ module ArmEnd(length=armend_length){ ////toplevel
     }
   }
 
-if (0)
   for (circum = [300:100:1500]) {
     assign(rad = circum / tau)
       assign(fn = str("filamentspool-number-n",circum,".dxf"))
       assign(xlen = rad - real_exteffrad) {
       echo(circum, rad, xlen);
-      translate([xlen, -armendwallthick, -armendbasethick])
+      if (xlen >= numbers_tick_width/2 &&
+         xlen <= length - numbers_height_allow)
+      translate([xlen, -armendwallthick,
+                -armendbasethick + (totalheight - numbers_tick_len)/2])
        color("blue"){
-       translate([-.5,-1,0]) cube([1,2,15]);
+       translate([-numbers_tick_width/2, -1, 0])
+         cube([numbers_tick_width, numbers_relief+1, numbers_tick_len]);
        //  echo(fn);
-       translate([0,0, totalheight - 1])
+       translate([numbers_tick_width/2 + numbers_tick_linespc,
+                  1,
+                  numbers_tick_len])
          rotate([90,0,0])
          rotate([0,0,-90])
-         linear_extrude(height=10)
+         linear_extrude(height= numbers_relief+1)
          //    scale(templatescale)
          import(file=fn, convexity=100);
       }