Compare commits
No commits in common. "b1d018f50a3c23c0b96b64bf60affbe7250f4641" and "8ee2c372d88a9dab135a32ae67c210bc58c7e938" have entirely different histories.
b1d018f50a
...
8ee2c372d8
27
coaster.json
27
coaster.json
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
22
coaster.scad
22
coaster.scad
|
|
@ -5,33 +5,13 @@ 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
|
||||
|
||||
module coaster_frame() {
|
||||
rotate([0, 180, 0]) {
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
|
||||
Mouth_type = "wide"; // ["wide", "regular"]
|
||||
Holder_type = "lid"; // ["lid", "ring"]
|
||||
Holder_height = 177.0; // 0.1
|
||||
Holder_base_depth = 2.0; // 0.1
|
||||
Holder_stake_width = 3.0; // 0.1
|
||||
|
||||
/* [Mouth Settings] */
|
||||
wide_mouth_ring_od = 88.9; // 3.5"
|
||||
wide_mouth_ring_id = 69.85; // 2.75"
|
||||
wide_mouth_ring_height = 16.0;
|
||||
wide_mouth_lid_diameter = 82.6; // 3.25"
|
||||
wide_mouth_lid_depth = 2.5; // ish
|
||||
wide_mouth_base_diameter = 94.0; // 0.1
|
||||
|
||||
regular_mouth_ring_od = 73.03; // 2 7/8"
|
||||
regular_mouth_ring_id = 57.15; // 2 1/4"
|
||||
regular_mouth_ring_height = 14.0;
|
||||
regular_mouth_lid_diameter = 66.675; // 2 5/8"
|
||||
regular_mouth_lid_depth = 2.5; // ish
|
||||
regular_mouth_base_diameter = 76.0; // 0.1
|
||||
|
||||
custom_mouth_ring_od = 0; // 0.01
|
||||
custom_mouth_ring_id = 0; // 0.01
|
||||
custom_mouth_ring_height = 0; // 0.01
|
||||
custom_mouth_lid_diameter = 0; // 0.01
|
||||
custom_mouth_base_diameter = 0; // 0.01
|
||||
|
||||
/* [OpenSCAD Settings] */
|
||||
$fn = 120.0; // 0.1
|
||||
|
||||
module base() {
|
||||
difference() {
|
||||
cylinder(h = Holder_base_depth, d = base_diameter);
|
||||
}
|
||||
}
|
||||
|
||||
module stake(width, depth, height) {
|
||||
// @TODO: Calculate the offsets
|
||||
height_offset = 30;
|
||||
width_offset = 8;
|
||||
difference() {
|
||||
cube([width, depth, height]);
|
||||
translate([width/2, depth+0.5, height/2]) {
|
||||
rotate([90, 0, 0]) {
|
||||
#hull() {
|
||||
translate([0, -height/2 + height_offset, 0]) {
|
||||
cylinder(h = depth+1, r= width/2 - width_offset);
|
||||
}
|
||||
translate([0, height/2 - height_offset, 0]) {
|
||||
cylinder(h = depth+1, r = width/2 - width_offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module ring_holder() {
|
||||
height = Holder_height - Holder_base_depth;
|
||||
depth = Holder_stake_width;
|
||||
width = (Mouth_type == "wide" ? wide_mouth_ring_id : regular_mouth_ring_id) / 2.0 - 1.0;
|
||||
union() {
|
||||
cylinder(height, r=depth);
|
||||
// @TODO: Translate a bit to center the stakes
|
||||
for (angle = [0, 120, 240]) {
|
||||
rotate(angle, [0,0,1]) {
|
||||
stake(width, depth, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module lid_holder() {
|
||||
height = Holder_height - Holder_base_depth;
|
||||
depth = Holder_stake_width;
|
||||
width = (Mouth_type == "wide" ? wide_mouth_lid_diameter : regular_mouth_lid_diameter) + 1.0;
|
||||
difference() {
|
||||
cylinder(h=height, d = width + depth*2);
|
||||
cylinder(h=height, d = width);
|
||||
translate([-depth*2, -depth*2, 0]) {
|
||||
#cube([width, width, height]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base_diameter = Mouth_type == "wide" ? wide_mouth_base_diameter : regular_mouth_base_diameter;
|
||||
|
||||
union() {
|
||||
translate([0, 0, -Holder_base_depth]) {
|
||||
base();
|
||||
}
|
||||
if (Holder_type == "ring") {
|
||||
ring_holder();
|
||||
}
|
||||
if (Holder_type == "lid") {
|
||||
lid_holder();
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue