[OpenSCAD] Bent rod

Carsten Arnholm arnholm at arnholm.org
Sun Sep 27 18:29:50 EDT 2015


On 2015-09-27 18:31, blobule wrote:
> %%%%%%%%%%%%%%%%%%%%%%%
>
> $step=10;
> $h=0.1;
>
> // cr : cylinder radisu for wrapping
> // r : radius of actual pipe
> // vr : radius of "virtual" pipe, used to place the real pipe
>
> module place(cr=20,r=5,vr=5,t=0) {
>      rotate(t,[0,0,1])
>      translate([cr+vr,0,t/360*2*vr])
>      rotate(90,[1,0,0]) linear_extrude(height=$h,center=true) circle(r=r);
> }
 > ....

That is a clever special case work-around for a missing feature: a 
general sweep function that can take a 2d shape and sweep it along any path.

Thank you for this inspiring example.

Carsten Arnholm




More information about the Discuss mailing list