chiark / gitweb /
electron-token: delete channels; add to Makefile
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Jun 2017 20:42:23 +0000 (21:42 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Jun 2017 20:42:23 +0000 (21:42 +0100)
Makefile
electron-token.scad.pl

index 70929a3397bfe798dc83644dcbe1f248d96805d1..cc087661db1c72c5f473ac74de04f7d3453a1724 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -177,6 +177,8 @@ question-token.stl: question-question.dxf
 
 lemon-stand.stl: lemon-stand.scad
 
+electron-token.stl: electron-token.scad
+
 .PRECIOUS: $(SCREWRECESSTEST_DXFS) $(SCREWRECESSTEST_DXFS) \
        $(foreach s,$(SCREWRECESSTEST_SIZES), \
                screw-recess-test-number-s$s.fig \
index 8c1d10f54338529a21998c8656a3db2ba2fdaa25..8ba27c2f8fc648d80e6218c746191d78c750f90f 100755 (executable)
@@ -9,12 +9,9 @@ use constant tau => pi*2;
 
 my $ellipse = 25 / 2;
 my $circle = 7 / 2;
-my $channelh = 3;
-my $channelw = 4;
 my $xscale = 35 / 25;
 my $N = 180; # around ellipse
 my $M = 80; # around each circle
-my @channeldistprops = (0, 1/3, 2/3);
 
 my $NMdiv = $ENV{'LEMONSTAND_COARSE'} || 1;
 
@@ -124,28 +121,6 @@ sub infodistprop ($) {
     die "$distprop ?";
 }
 
-sub channels(){
-    print "module Channels(){\n";
-    
-    foreach my $cdp (
-                    (map { 0.5 *  $_    } @channeldistprops),
-                    (map { 0.5 * ($_+1) } @channeldistprops),
-                   ) {
-       my ($ctr, $along) = infodistprop($cdp);
-       my $angle = atan2(-$along->[0], $along->[1]);
-       print "  translate(",scadvec($ctr),")\n";
-       print "  rotate([0,0,$angle*360/",tau,"])\n";
-       print "  rotate([0,90,0])\n";
-       print "  translate([0,0, -2*$circle])\n";
-       print "  scale([1, $channelw/$channelh/2, 1])\n";
-       print "  rotate([0,0,360/8/2])\n";
-       print "  cylinder(r=$channelh, h=4*$circle, \$fn=8);\n";
-    }
-    print "}\n";
-}
-
-channels();
-
 while (<DATA>) { print };
 
 STDOUT->error and die $!;
@@ -156,7 +131,6 @@ module Stand(){
     difference(){
        translate([0,0,torusyup])
            Torusy();
-       Channels();
        translate([-200,-200,-50])
            cube([400,400,50]);
     }