chiark / gitweb /
filamentspool: wip scale, nfc as yet because if (0)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 9 Feb 2016 20:32:29 +0000 (20:32 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 9 Feb 2016 20:32:29 +0000 (20:32 +0000)
.gitignore
Makefile
filamentspool-number.eps.pl [new file with mode: 0755]
filamentspool.scad

index d0a75d2..0ae949f 100644 (file)
@@ -19,3 +19,5 @@ question-question.eps
 lemon-stand.scad
 commitid.scad
 commitid-best-test.scad
+filamentspool-number-n*.dxf
+filamentspool-number-n*.eps
index 9e879ab..3c6f1e9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -121,6 +121,15 @@ pandemic-quarantine-l%.eps: pandemic-quarantine-numbers.fig
                fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
                @mv -f $@.tmp $@
 
+FILAMENTSPOOL_NUMBERS=$(shell seq 300 100 1500)
+filamentspool-number-n%.eps:   filamentspool-number.eps.pl
+       ./$< $* >$@.tmp && mv -f $@.tmp $@
+
+FILAMENTSPOOL_DXFS=$(foreach n,$(FILAMENTSPOOL_NUMBERS), \
+       filamentspool-number-n$n.dxf)
+
+filamentspool-numbers filamentspool.stl: $(FILAMENTSPOOL_DXFS)
+
 SCREWRECESSTEST_SIZES= 2 3 4 5 6
 SCREWRECESSTEST_DXFS=$(foreach s,$(SCREWRECESSTEST_SIZES), \
        screw-recess-test-number-s$s.dxf)
diff --git a/filamentspool-number.eps.pl b/filamentspool-number.eps.pl
new file mode 100755 (executable)
index 0000000..c9cce78
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl -w
+use strict;
+die unless @ARGV==1 && $ARGV[0] =~ m/^\d+/;
+my $num = $ARGV[0];
+$num /= 1000;
+printf <<END, $num or die $!;
+%!
+/Helvetica-Bold findfont
+15 scalefont
+setfont
+0 0 moveto
+(%.1f) show
+showpage
+END
index e5e7af4..dd112d2 100644 (file)
@@ -251,6 +251,8 @@ totalwidth = armendwallthick*2 + channelwidth;
 totalheight = channeldepth + armendbasethick;
 stalkwidth = prongwidth + prongstalkxwidth;
 
+tau = PI*2;
+
 module ArmEnd(length=armend_length){ ////toplevel
   if (usedove()) {
     translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
@@ -269,6 +271,26 @@ 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])
+       color("blue"){
+       translate([-.5,-1,0]) cube([1,2,15]);
+       //  echo(fn);
+       translate([0,0, totalheight - 1])
+         rotate([90,0,0])
+         rotate([0,0,-90])
+         linear_extrude(height=10)
+         //    scale(templatescale)
+         import(file=fn, convexity=100);
+      }
+    }
+  }
+
   difference(){
     translate([0, -armendwallthick, -armendbasethick])
       cube([length, totalwidth, totalheight]);