discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] screw (thread) around a cone

C
caterpillar
Sat, May 6, 2017 12:44 PM

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


http://openhome.cc

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.

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> ----- http://openhome.cc -- 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.
RP
Ronaldo Persiano
Sat, May 6, 2017 9:22 PM

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


http://openhome.cc

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

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> > > > > > ----- > http://openhome.cc > -- > 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 >
C
caterpillar
Sun, May 7, 2017 1:14 AM

In my computer, it takes about 1 minute to render this example.

http://forum.openscad.org/file/n21421/captured.jpg


http://openhome.cc

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.

In my computer, it takes about 1 minute to render this example. <http://forum.openscad.org/file/n21421/captured.jpg> ----- http://openhome.cc -- 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.
C
caterpillar
Wed, May 10, 2017 2:31 PM

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.


http://openhome.cc

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.

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. ----- http://openhome.cc -- 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.