[OpenSCAD] Twisted Torus

Parkinbot rudolf at digitaldocument.de
Thu Oct 4 03:03:47 EDT 2018


Ok, the full solution is: 

use <Naca_sweep.scad> // https://www.thingiverse.com/thing:900137/files

twistedTorus( 25, 50 );
#translate( [-100, 0, 0] ) rotate( [90, 180, 0] ) twistedTorus( 25, 50 ); 

module twistedTorus(r1,r2,N=30) 
{
  sweep(moebius(r1=100, r2=50, twist=1));
  sweep(moebius(r1=100, r2=50, twist=1, start=180, end=360, N=N));
}

function moebius(r1=100, r2=50, start=0, end = 180, N=30, twist=0.5) =
 [for(j=[0:N]) let(i= start+j*(end-start)/N)
  Rz_(i,
  Tx_(-r1,
  Rx_(90,
  Rz_(i*twist, halfcirc(r2))
  )))];

function halfcirc(r=50, N=30) =  [for(i=[0:N]) let(w=180/N*i) r*[sin(w),
cos(w), 0]];



--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list