From 4c544e534e31c0b1b3b311204a8b3b90ff1eaa34 Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Mon, 6 Dec 2021 20:00:47 -0500 Subject: [PATCH 1/1] mead-horn: add twist and x/y scaling --- mead-horn/mead-horn.scad | 54 +++++++++++----------------------------- 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/mead-horn/mead-horn.scad b/mead-horn/mead-horn.scad index 9a26f8d..f3a6e9d 100644 --- a/mead-horn/mead-horn.scad +++ b/mead-horn/mead-horn.scad @@ -3,64 +3,40 @@ // Single person mead horn, for winter solstice 2021 since sharing // mead from the real horn is probably still unsafe. -// https://openhome.cc/eGossip/OpenSCAD/lib3x-golden_spiral_extrude.html use ; -use ; use ; bottom_radius = 4; -top_radius = 30; +top_radius = 33; horn_length = 135; +horn_rise = 40; +horn_twist = 0; +horn_aspect = [ 0.92, 1.0 ]; module helix_horn () { helix_levels = 1/6; - arc_measure = (360 * helix_levels) * (3.13 / 180) ; + arc_measure = (360 * helix_levels) * (3.13 / 180); arc_length = horn_length; - helix_radius = (arc_length / arc_measure); - echo (helix_radius); - - translate ([helix_radius, 0, 0]) scale ([1, 1/2, 1]) intersection () { + // Round off end + // todo: dotscad rounded cone instead? + translate ([helix_radius, 0, 0]) scale ([horn_aspect[0], 1/2, horn_aspect[1]]) intersection () { sphere (r = bottom_radius); rotate ([90, 0, 0]) cylinder (h = bottom_radius, r = bottom_radius, center=false); } - - shape_pts = shape_circle (radius = bottom_radius); - + + shape_pts = [ for (pts = shape_circle (radius = bottom_radius)) [ pts[0] * horn_aspect[0], pts[1] * horn_aspect[1] ] ]; + helix_extrude(shape_pts, radius = helix_radius, scale = top_radius/bottom_radius, levels = helix_levels, - level_dist = top_radius * 5, - vt_dir = "SPI_UP" + level_dist = horn_rise / helix_levels, + vt_dir = "SPI_UP", + twist = horn_twist / helix_levels ); } -helix_horn ($fs = 0.3, $fa = 1); - - - -//linear_extrude (height = 120, scale = top_radius/bottom_radius, twist = 500) { -// circle (r = bottom_radius, $fn=5); -//} - - -/* - $fn = 64; -//shape_pts = concat( -// shape_circle(radius = 3), -// shape_circle(radius = 2.5) -//); -shape_pts = shape_circle(radius = 2); - -golden_spiral_extrude( - shape_pts, - from = 7, - to = 10, - point_distance = 1, - scale = 10, - triangles = "SOLID" -); -*/ +helix_horn ($fs = 0.1, $fa = 1); -- 2.20.1