From 0436387a2064b2c152f3786285d10198c1f9e0ab Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 18 Jun 2017 21:42:23 +0100 Subject: [PATCH] electron-token: delete channels; add to Makefile --- Makefile | 2 ++ electron-token.scad.pl | 26 -------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 70929a3..cc08766 100644 --- 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 \ diff --git a/electron-token.scad.pl b/electron-token.scad.pl index 8c1d10f..8ba27c2 100755 --- a/electron-token.scad.pl +++ b/electron-token.scad.pl @@ -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 () { 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]); } -- 2.30.2