From 0041bc9c4acf9ad3a2ac90fd790faf03cf415a75 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sun, 4 Jan 2026 09:32:11 -0500 Subject: [PATCH] Add inner coaster pattern - circle --- coaster.json | 27 +++++++++++++++++++++++++++ coaster.scad | 22 +++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 coaster.json diff --git a/coaster.json b/coaster.json new file mode 100644 index 0000000..2f909be --- /dev/null +++ b/coaster.json @@ -0,0 +1,27 @@ +{ + "parameterSets": { + "design default values": { + "$fn": "180", + "Depth": "4", + "Diameter": "101.6", + "Inner_pattern": "c", + "Inner_pattern_depth": "1", + "Inner_pattern_width": "24.5", + "Inset": "true", + "Inset_depth": "1", + "Inset_width": "15" + }, + "hdd-2.5-v1": { + "$fn": "180", + "Depth": "4", + "Diameter": "101.6", + "Inner_pattern": "c", + "Inner_pattern_depth": "1", + "Inner_pattern_width": "24.5", + "Inset": "true", + "Inset_depth": "1", + "Inset_width": "15" + } + }, + "fileFormatVersion": "1" +} diff --git a/coaster.scad b/coaster.scad index 9a8ddc3..ebf8553 100644 --- a/coaster.scad +++ b/coaster.scad @@ -5,13 +5,33 @@ Inset = false; Inset_depth = 4; // 0.1 Inset_width = 5; // 0.1 +Inner_pattern = "n"; // [n: None, c: Circle] +Inner_pattern_width = 5; // 0.1 +Inner_pattern_depth = 1; // 0.1 + $fn = 180; // 0.1 -rotate([0, 180, 0]) { +module coaster_frame() { difference() { cylinder(h = Depth, d = Diameter); if (Inset) { cylinder(h = Inset_depth, d = Diameter - 2*Inset_width); }; }; +} + +module coaster_pattern() { + offset = Inset ? [0, 0, Inset_depth - Inner_pattern_depth] : [0, 0, -Inner_pattern_depth]; + if (Inner_pattern == "c") { + translate(offset) { + #cylinder(h = Inner_pattern_depth, d = Inner_pattern_width); + } + } +} + +rotate([0, 180, 0]) { + union() { + coaster_frame(); + coaster_pattern(); + } }; \ No newline at end of file