diff vs bare: +34/-31
$fn = 96;
// ===== Parameters =====
- leaf_len = 30; // along Y
- leaf_w = 25; // along X from hinge axis outward
- leaf_t = 2; // along Z
+ leaf_len = 30; // Y direction
+ leaf_w = 25; // X direction from hinge axis outward
+ leaf_t = 2; // Z thickness
pin_d = 4;
- pin_r = pin_d/2;
- pin_len = 32;
+ pin_r = pin_d / 2;
+ pin_len = 32; // 30 + 1 mm each end exposed
knuckle_od = 8;
- knuckle_or = knuckle_od/2;
- knuckle_id = 4.6;
- knuckle_ir = knuckle_id/2;
+ knuckle_or = knuckle_od / 2;
+ knuckle_id = 4.6; // pin + 0.3 clearance
+ knuckle_ir = knuckle_id / 2;
knuckle_seg = 6; // 30 / 5
- csk_through_d = 3.2;
- csk_head_d = 6.0;
+ through_d = 3.2;
+ csk_d = 6.0;
csk_depth = 1.0;
- // screw positions on each leaf
+ screw_pitch = 8;
screw_y = [7, 15, 23];
- // ===== Helpers =====
+ // Screw columns placed away from knuckle side
+ screw_x_left = -18;
+ screw_x_right = 18;
+
+ // Leaf surface position so that flat faces are coplanar at z=0
+ leaf_z0 = -leaf_t;
+
+ // ===== Modules =====
module pin_axis() {
translate([0, -1, 0])
rotate([-90, 0, 0])
cylinder(h = pin_len, r = pin_r);
}
module knuckle_segment(y0) {
translate([0, y0, 0])
rotate([-90, 0, 0])
difference() {
cylinder(h = knuckle_seg, r = knuckle_or);
cylinder(h = knuckle_seg, r = knuckle_ir);
}
}
- module countersunk_hole(ypos, xfrom_axis, from_top=true) {
- x = xfrom_axis;
- translate([x, ypos, 0]) {
+ module countersunk_hole(x, y) {
+ translate([x, y, leaf_z0]) {
// through hole
- cylinder(h = leaf_t, d = csk_through_d);
- // countersink from top surface
- if (from_top) {
- translate([0, 0, leaf_t - csk_depth])
- cylinder(h = csk_depth + 0.001, d1 = csk_through_d, d2 = csk_head_d);
- } else {
- cylinder(h = csk_depth + 0.001, d1 = csk_head_d, d2 = csk_through_d);
- }
+ cylinder(h = leaf_t + 0.01, d = through_d);
+
+ // countersink from top flat face (z=0 side)
+ translate([0, 0, leaf_t - csk_depth])
+ cylinder(h = csk_depth + 0.02, d1 = through_d, d2 = csk_d);
}
}
- module leaf_base(side="left") {
+ module leaf_plate(side="left") {
if (side == "left") {
- translate([-leaf_w, 0, 0])
+ translate([-leaf_w, 0, leaf_z0])
cube([leaf_w, leaf_len, leaf_t]);
} else {
- translate([0, 0, 0])
+ translate([0, 0, leaf_z0])
cube([leaf_w, leaf_len, leaf_t]);
}
}
module left_leaf() {
difference() {
union() {
- leaf_base("left");
+ leaf_plate("left");
knuckle_segment(0);
knuckle_segment(12);
knuckle_segment(24);
}
for (yy = screw_y)
- countersunk_hole(yy, -18, true);
+ countersunk_hole(screw_x_left, yy);
}
}
module right_leaf() {
difference() {
union() {
- leaf_base("right");
+ leaf_plate("right");
knuckle_segment(6);
knuckle_segment(18);
}
for (yy = screw_y)
- countersunk_hole(yy, 18, true);
+ countersunk_hole(screw_x_right, yy);
}
}
- // ===== Assembly: 180° open =====
+ // ===== Assembly =====
left_leaf();
right_leaf();
pin_axis();
SCAD (97 lines)
$fn = 96;
// ===== Parameters =====
leaf_len = 30; // Y direction
leaf_w = 25; // X direction from hinge axis outward
leaf_t = 2; // Z thickness
pin_d = 4;
pin_r = pin_d / 2;
pin_len = 32; // 30 + 1 mm each end exposed
knuckle_od = 8;
knuckle_or = knuckle_od / 2;
knuckle_id = 4.6; // pin + 0.3 clearance
knuckle_ir = knuckle_id / 2;
knuckle_seg = 6; // 30 / 5
through_d = 3.2;
csk_d = 6.0;
csk_depth = 1.0;
screw_pitch = 8;
screw_y = [7, 15, 23];
// Screw columns placed away from knuckle side
screw_x_left = -18;
screw_x_right = 18;
// Leaf surface position so that flat faces are coplanar at z=0
leaf_z0 = -leaf_t;
// ===== Modules =====
module pin_axis() {
translate([0, -1, 0])
rotate([-90, 0, 0])
cylinder(h = pin_len, r = pin_r);
}
module knuckle_segment(y0) {
translate([0, y0, 0])
rotate([-90, 0, 0])
difference() {
cylinder(h = knuckle_seg, r = knuckle_or);
cylinder(h = knuckle_seg, r = knuckle_ir);
}
}
module countersunk_hole(x, y) {
translate([x, y, leaf_z0]) {
// through hole
cylinder(h = leaf_t + 0.01, d = through_d);
// countersink from top flat face (z=0 side)
translate([0, 0, leaf_t - csk_depth])
cylinder(h = csk_depth + 0.02, d1 = through_d, d2 = csk_d);
}
}
module leaf_plate(side="left") {
if (side == "left") {
translate([-leaf_w, 0, leaf_z0])
cube([leaf_w, leaf_len, leaf_t]);
} else {
translate([0, 0, leaf_z0])
cube([leaf_w, leaf_len, leaf_t]);
}
}
module left_leaf() {
difference() {
union() {
leaf_plate("left");
knuckle_segment(0);
knuckle_segment(12);
knuckle_segment(24);
}
for (yy = screw_y)
countersunk_hole(screw_x_left, yy);
}
}
module right_leaf() {
difference() {
union() {
leaf_plate("right");
knuckle_segment(6);
knuckle_segment(18);
}
for (yy = screw_y)
countersunk_hole(screw_x_right, yy);
}
}
// ===== Assembly =====
left_leaf();
right_leaf();
pin_axis();