[OpenSCAD] Twisted Torus

Parkinbot rudolf at digitaldocument.de
Sat Oct 6 04:09:46 EDT 2018


Ronaldo wrote
> For simple cases of tubular forms -
> that is, all sections are equal - as the present case of twisted torus,
> the
> user computation of the section positions could be avoided by a generic
> process good enough for most cases. 

This is true and the orthogonal approach can make things easy in certain
cases. But is a somehow oriented half circle (which is a one-liner) still a
simple case? 
When I played around with the "original" sweep mentioned by you, I found it
quite difficult to define the right transformation paths and I still find it
a bit callenging. 
Therefore I prefer the most general solution as it has a very easy logic:
1. define a (optionally parametrized) 2D-shape in XY-plane
2. map the shape to the desired path using affine operations an iteration
variable

To a man who has hammer the whole world looks like a nail. 
 
For the discussed twisted half circle torus my sweep indeed supports a
"close" parameter that can be used to close tori with integral twists making
the half tori union obsolete. 

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

module twistedTorus(r1,r2,N=30)
  sweep(moebius(r1=100, r2=50, end= 360, twist=1), close = true);
  



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



More information about the Discuss mailing list