From 001c3aa7035a8ef675b53c7f2a8d80148b71ae2b Mon Sep 17 00:00:00 2001 From: Christian Hodgden Date: Sun, 13 Oct 2024 20:59:36 -0500 Subject: Updated Candles 1. Adjusted heights. 2. Regenerated stls. 3. Renamed direcory to candles. --- candles/diamond.scad | 29 +++++++++++++++++++++++++++++ candles/diamond.stl | Bin 0 -> 3584 bytes candles/taper.scad | 28 ++++++++++++++++++++++++++++ candles/taper.stl | Bin 0 -> 480784 bytes candlestick_molds/diamond.scad | 28 ---------------------------- candlestick_molds/diamond.stl | Bin 2984 -> 0 bytes candlestick_molds/taper.scad | 37 ------------------------------------- lib/view_stl.scad | 2 +- 8 files changed, 58 insertions(+), 66 deletions(-) create mode 100644 candles/diamond.scad create mode 100644 candles/diamond.stl create mode 100644 candles/taper.scad create mode 100644 candles/taper.stl delete mode 100644 candlestick_molds/diamond.scad delete mode 100644 candlestick_molds/diamond.stl delete mode 100644 candlestick_molds/taper.scad diff --git a/candles/diamond.scad b/candles/diamond.scad new file mode 100644 index 0000000..ba8aabb --- /dev/null +++ b/candles/diamond.scad @@ -0,0 +1,29 @@ + +face_diagonal = sqrt(2); +cube_diagonal = sqrt((face_diagonal^2)+1); +angle = asin(face_diagonal/cube_diagonal); +point_height_1 = cos(angle); +point_height_2 = (cube_diagonal-(2*point_height_1)); + +module diamond(vertical_position=0) { + rotate([0, 0, vertical_position*60]) + scale([1, 1, 2]) + translate([0, 0, vertical_position * point_height_2]) + translate([0, 0, -point_height_1]) + rotate(angle, [1, -1, 0]) + cube(); +} + +difference() { + diamond(0); + translate([-2, -2, -2]) + cube([4, 4, 2]); +} +diamond(1); +diamond(2); +diamond(3); +diamond(4); +diamond(5); +diamond(6); +diamond(7); + diff --git a/candles/diamond.stl b/candles/diamond.stl new file mode 100644 index 0000000..0fa58fb Binary files /dev/null and b/candles/diamond.stl differ diff --git a/candles/taper.scad b/candles/taper.scad new file mode 100644 index 0000000..5d8fff5 --- /dev/null +++ b/candles/taper.scad @@ -0,0 +1,28 @@ + +use <../lib/bezier.scad>; + +$fn = 100; +base_radius = 3/8; +top_radius = base_radius * 0.75; +top_height = top_radius * 2; +total_height = 7.5; +stem_height = total_height - top_height; + +cylinder(stem_height, base_radius, top_radius); + +control_points = [ + [top_radius, 0], + [0.125, top_height/4], + [0.125, top_height/2], + [0.125, 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); + diff --git a/candles/taper.stl b/candles/taper.stl new file mode 100644 index 0000000..c8029aa Binary files /dev/null and b/candles/taper.stl differ diff --git a/candlestick_molds/diamond.scad b/candlestick_molds/diamond.scad deleted file mode 100644 index ad3f3c4..0000000 --- a/candlestick_molds/diamond.scad +++ /dev/null @@ -1,28 +0,0 @@ - -face_diagonal = sqrt(2); -cube_diagonal = sqrt((face_diagonal^2)+1); -angle = asin(face_diagonal/cube_diagonal); -point_height_1 = cos(angle); -point_height_2 = (cube_diagonal-(2*point_height_1)); - -module diamond(vertical_position=0) { - rotate([0, 0, vertical_position*60]) - scale([1, 1, 2]) - translate([0, 0, vertical_position * point_height_2]) - translate([0, 0, -point_height_1]) - rotate(angle, [1, -1, 0]) - cube(); -} - -difference() { - diamond(0); - translate([-2, -2, -2]) - cube([4, 4, 2]); -} -diamond(1); -diamond(2); -diamond(3); -diamond(4); -diamond(5); -diamond(6); - diff --git a/candlestick_molds/diamond.stl b/candlestick_molds/diamond.stl deleted file mode 100644 index 81c4d54..0000000 Binary files a/candlestick_molds/diamond.stl and /dev/null differ diff --git a/candlestick_molds/taper.scad b/candlestick_molds/taper.scad deleted file mode 100644 index 97356dd..0000000 --- a/candlestick_molds/taper.scad +++ /dev/null @@ -1,37 +0,0 @@ - -use <../lib/bezier.scad>; - -$fn = 100; -base_radius = (7/8)/2; -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.125, top_height/4], - [0.125, top_height/2], - [0.125, 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([0, 0, 0]) - stick(); - translate([-1.5, -1.5, -0.01]) - cube([3, 3, 5.01]); -}; diff --git a/lib/view_stl.scad b/lib/view_stl.scad index 15efedc..3e98a11 100644 --- a/lib/view_stl.scad +++ b/lib/view_stl.scad @@ -1,2 +1,2 @@ -import ("../candlestick_molds/diamond.stl"); +import ("../candles/diamond.stl"); -- cgit v1.2.3