[OpenSCAD] another sweep() question

jon jon at jonbondy.com
Fri Jan 5 09:55:06 EST 2018

I am unclear why this code results in a pristine cylindrical extrusion 
EXCEPT for one small place where it seems to twist frantically...

include <sweep.scad>

function f(a) = [18*sin(360*a), 18-18*cos(360*a*0.7), 36*sin(360*a/2)];

function shape(d) = let (dd = 5 * (1.2 - d/steps))
     [for (i=[1:10:360]) [dd*sin(i), dd*cos(i)]];

step = 0.005;
steps = 1/step;
path = [for (t=[step:step:1-step]) f(t)];
path_transforms = construct_transform_path(path);
sweep(shape(1), path_transforms);

Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180105/f67752ec/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fjhekeehcoonemin.png
Type: image/png
Size: 76299 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180105/f67752ec/attachment.png>

More information about the Discuss mailing list