aboutsummaryrefslogtreecommitdiff
path: root/candlestick_molds/taper.scad
blob: 3d4a73ecd151cf22b54ca7c11b5f6c6b0464f09a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use <../lib/bezier.scad>;

$fn = 100;
base_radius = 7/8;
top_radius = base_radius * 0.75;
top_height = top_radius * 2;
total_height = 10;
stem_height = total_height - top_height;

module stick() {
	cylinder(stem_height, base_radius, top_radius);

	control_points = [
		[top_radius, 0],
		[0.25, 0.5],
		[0.4, top_height],
		[0, top_height]
	];
	// adjust curve_facets for low & odd $fn values
	curve_facets = $fn/2;
	head_curve = bezier_curve(control_points, $fn=curve_facets);
	top_curve = concat(head_curve, [[0, 0]]);

	translate([0, 0, stem_height])
		rotate_extrude()
			polygon(top_curve);
};

difference() {
	translate([-1.5, -1.5, 0.01])
    	cube([6, 6, total_height]);

	translate([0, 0, 0]) stick();
	translate([3, 0, 0]) stick();
	translate([0, 3, 0]) stick();
	translate([3, 3, 0]) stick();
};