From 3b462ccc1bc389ce68873d61395ff05ed50693fa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 9 Feb 2016 20:32:29 +0000 Subject: [PATCH] filamentspool: wip scale, nfc as yet because if (0) --- .gitignore | 2 ++ Makefile | 9 +++++++++ filamentspool-number.eps.pl | 14 ++++++++++++++ filamentspool.scad | 22 ++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100755 filamentspool-number.eps.pl diff --git a/.gitignore b/.gitignore index d0a75d2..0ae949f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ question-question.eps lemon-stand.scad commitid.scad commitid-best-test.scad +filamentspool-number-n*.dxf +filamentspool-number-n*.eps diff --git a/Makefile b/Makefile index 9e879ab..3c6f1e9 100644 --- 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 index 0000000..c9cce78 --- /dev/null +++ b/filamentspool-number.eps.pl @@ -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 <