mead-horn: note dependency on dotscad
[clinton/3d-models.git] / mead-horn / mead-horn.scad
1 // Simple 3D Printable Drinking Horn
2 // Copyright (c) 2021 Clinton Ebadi <clinton@unknownlamer.org>
3
4
5 // Released under the https://wiki.creativecommons.org/wiki/CC0
6 // To the extent possible under law, Clinton Ebadi has waived all
7 // copyright and related or neighboring rights to Simple 3D Printable Drinking Horn.
8
9 // Single person mead horn, for winter solstice 2021 since sharing
10 // mead from the real horn is probably still unsafe.
11
12 use <dotscad/shape_circle.scad>;
13 use <dotscad/helix_extrude.scad>;
14
15 bottom_radius = 4;
16 top_radius = 33;
17 horn_length = 135;
18 horn_rise = 40;
19 horn_twist = 0;
20 horn_aspect = [ 1.0, 0.92 ]; // [0:0.01:100]
21
22 module helix_horn () {
23 helix_levels = 1/6;
24
25 arc_measure = (360 * helix_levels) * (3.13 / 180);
26 arc_length = horn_length;
27 helix_radius = (arc_length / arc_measure);
28
29 // Round off end
30 // todo: dotscad rounded cone instead?
31 translate ([helix_radius, 0, 0]) scale ([horn_aspect[0], 1/2, horn_aspect[1]]) intersection () {
32 sphere (r = bottom_radius);
33 rotate ([90, 0, 0]) cylinder (h = bottom_radius, r = bottom_radius, center=false);
34 }
35
36 shape_pts = [ for (pts = shape_circle (radius = bottom_radius)) [ pts[0] * horn_aspect[0], pts[1] * horn_aspect[1] ] ];
37
38 helix_extrude(shape_pts,
39 radius = helix_radius,
40 scale = top_radius/bottom_radius,
41 levels = helix_levels,
42 level_dist = horn_rise / helix_levels,
43 vt_dir = "SPI_UP",
44 twist = horn_twist / helix_levels
45 );
46 }
47
48 helix_horn ($fs = 0.1, $fa = 1);