chiark / gitweb /
lemon-stand.scad.pl: assembly wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Jan 2016 00:16:43 +0000 (00:16 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Jan 2016 00:16:43 +0000 (00:16 +0000)
lemon-stand.scad.pl

index 048f4d7bdb6813ad3a4c4887c534d7d4ef3183f4..308892ac07c6eb99cc604334ee4054ae4becb94e 100755 (executable)
@@ -7,11 +7,6 @@ use IO::File;
 use Data::Dumper;
 use constant tau => pi*2;
 
-print <<END;
-// -*- C -*-
-// *** AUTOGENERATED - DO NOT EDIT ***
-END
-
 my $ellipse = 20;
 my $circle = 6;
 my $channel = 5;
@@ -20,6 +15,13 @@ my $N = 30; # around ellipse
 my $M = 20; # around each circle
 my @channeldistprops = (0, 1/3, 2/3);
 
+print <<END;
+// -*- C -*-
+// *** AUTOGENERATED - DO NOT EDIT ***
+END
+
+print "torusyup = ", ($circle / sqrt(2)), ";\n";
+
 our @ellipse = map {
     my $theta = tau * $_ / $N;
     V( cos($theta) * $ellipse * $xscale, sin($theta) * $ellipse, 0 )
@@ -142,5 +144,13 @@ STDOUT->error and die $!;
 STDOUT->flush or die $!;
 
 __DATA__
-Torusy();
-Channels();
+module Stand(){
+    difference(){
+       translate([0,0,torusyup])
+           Torusy();
+       Channels();
+       translate([-200,-200,-50])
+           cube([400,400,50]);
+    }
+}
+Stand();