How about using my helix_extrude module?
https://github.com/JustinSDK/dotSCAD/blob/master/docs/lib-helix_extrude.md
include <helix.scad>;
include <rotate_p.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <helix_extrude.scad>;
r1 = 40;
r2 = 20;
levels = 5;
level_dist = 10;
shape_pts = [
[0, -2], [0, 2],
[1, 2], [1, 0],
[9, 0], [9, 2],
[10, 2], [10, -2]
];
helix_extrude(shape_pts,
radius = [r1, r2],
levels = levels,
level_dist = level_dist,
vt_dir = "SPI_UP",
triangles = [
[0, 1, 2],
[0, 2, 3],
[0, 3, 4],
[0, 4, 7],
[4, 5, 6],
[4, 6, 7]
]
);
%cylinder(h = levels * level_dist, r1 = r1, r2 = r2);
http://forum.openscad.org/file/n21419/lib-helix_extrude-2.jpg
View this message in context: http://forum.openscad.org/screw-thread-around-a-cone-tp20965p21419.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Interesting approach. It sweeps convex eventually holed 2D shapes.
However, as it breaks the sweep in so many small triangular prisms, I would
expect an even longer render time.
2017-05-06 9:44 GMT-03:00 caterpillar caterpillar@openhome.cc:
How about using my helix_extrude module?
https://github.com/JustinSDK/dotSCAD/blob/master/docs/lib-helix_extrude.md
include <helix.scad>;
include <rotate_p.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <helix_extrude.scad>;
r1 = 40;
r2 = 20;
levels = 5;
level_dist = 10;
shape_pts = [
[0, -2], [0, 2],
[1, 2], [1, 0],
[9, 0], [9, 2],
[10, 2], [10, -2]
];
helix_extrude(shape_pts,
radius = [r1, r2],
levels = levels,
level_dist = level_dist,
vt_dir = "SPI_UP",
triangles = [
[0, 1, 2],
[0, 2, 3],
[0, 3, 4],
[0, 4, 7],
[4, 5, 6],
[4, 6, 7]
]
);
%cylinder(h = levels * level_dist, r1 = r1, r2 = r2);
http://forum.openscad.org/file/n21419/lib-helix_extrude-2.jpg
View this message in context: http://forum.openscad.org/
screw-thread-around-a-cone-tp20965p21419.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
In my computer, it takes about 1 minute to render this example.
http://forum.openscad.org/file/n21421/captured.jpg
View this message in context: http://forum.openscad.org/screw-thread-around-a-cone-tp20965p21421.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Thanks for Ronaldo's reminder. I finally improved the extrusion performance
of solid or hollow shapes. It takes short time even you render the horn
below.
include <circle_path.scad>;
include <rotate_p.scad>;
include <golden_spiral.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <golden_spiral_extrude.scad>;
$fn = 12;
shape_pts = concat(
circle_path(radius = 3),
circle_path(radius = 2)
);
golden_spiral_extrude(
shape_pts,
from = 5,
to = 10,
point_distance = 1,
scale = 10,
triangles = "HOLLOW"
);
http://forum.openscad.org/file/n21422/lib-golden_spiral_extrude-2.jpg
I still reserve the triangles parameter for users who want to define a more
complex shape.
View this message in context: http://forum.openscad.org/screw-thread-around-a-cone-tp20965p21422.html
Sent from the OpenSCAD mailing list archive at Nabble.com.