X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=treefoil.scad.pl;h=ef9ef2614c83c9f25ad4e79c8080e8dc479ee7a5;hb=refs%2Fheads%2Fmaster;hp=b1ceecbec8400a3129e0aeffd953b0e3f234910d;hpb=1dd4579d895f0f99ebd9bd8cffc307296c207af0;p=reprap-play.git diff --git a/treefoil.scad.pl b/treefoil.scad.pl index b1ceecb..ef9ef26 100755 --- a/treefoil.scad.pl +++ b/treefoil.scad.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl -w +# Use: +# - support X/Y dist 0.5mm + use strict; our $shape = <<'END'; @@ -7,6 +10,12 @@ xyyZZYYXYxxyzYYZXzzxyXXYXXXZxxxyyXXZyyyzXXzz zxxYYXXZXzzxyXXYZyyzxZZXZZZYzzzxxZZYxxxyZZyy yzzXXZZYZyyzxZZXYxxyzYYZYYYXyyyzzYYXzzzxYYxx END +# simple version (unknotted, [0,1,2]^3): +# YxxyzYYZXzzxyXXYZyyzxZZX +# +# New and less symmetric one that also fits in the 2x2x2 box: +# YXXyzzYxYXZZxzyxYzyyZXZx +# (email 8.9.2022) sub o { print @_ or die $!; } @@ -36,3 +45,35 @@ o "}\n\n"; while () { o $_ } __DATA__ + +thick = 6; +edgeu = 10; +//edgeu = 15; + +// calculated + +octa_long = thick; +octa_short = octa_long / (1 + sqrt(2)); + +module OctaThing() { + hull(){ + for (r = [[0,0,0], [90,0,0], [0,90,0]]) { + rotate(r) + cube([ octa_short,octa_short, octa_long ], center=true); + } + } +} + +module TraceEdge(p,q) { + hull(){ + for (x=[p,q]) { + translate(x * edgeu) + OctaThing(); + } + } +} + +rotate([0,0,45]) + Trace(); + +