From b1d018f50a3c23c0b96b64bf60affbe7250f4641 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sun, 11 Jan 2026 11:49:05 -0500 Subject: [PATCH] update mason holder --- mason jar holder.scad | 99 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 mason jar holder.scad diff --git a/mason jar holder.scad b/mason jar holder.scad new file mode 100644 index 0000000..34da34e --- /dev/null +++ b/mason jar holder.scad @@ -0,0 +1,99 @@ + +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(); + } +}; \ No newline at end of file