Add inner coaster pattern - circle

This commit is contained in:
Kienan Stewart 2026-01-04 09:32:11 -05:00
parent 8ee2c372d8
commit 0041bc9c4a
2 changed files with 48 additions and 1 deletions

27
coaster.json Normal file
View File

@ -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"
}

View File

@ -5,13 +5,33 @@ Inset = false;
Inset_depth = 4; // 0.1 Inset_depth = 4; // 0.1
Inset_width = 5; // 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 $fn = 180; // 0.1
rotate([0, 180, 0]) { module coaster_frame() {
difference() { difference() {
cylinder(h = Depth, d = Diameter); cylinder(h = Depth, d = Diameter);
if (Inset) { if (Inset) {
cylinder(h = Inset_depth, d = Diameter - 2*Inset_width); 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();
}
}; };