diff vs bare: +72/-66
// Butt Hinge - 180° open position
// Pin axis along Y, leaves extend in -X and +X directions
+ $fn = 64;
+
// Parameters
- leaf_width = 25; // X direction (when open)
+ leaf_width = 25; // X extent of flat plate portion
leaf_length = 30; // Y direction (along pin)
- leaf_thick = 2; // Z direction
+ leaf_thick = 2; // Z thickness
pin_dia = 4;
pin_r = pin_dia / 2;
- pin_length = 32; // 1mm overhang each end
+ pin_length = 32; // 1mm overhang each end (-1 to 31)
knuckle_od = 8;
- knuckle_or = knuckle_od / 2;
- knuckle_id = pin_dia + 0.3; // 4.3mm ← clearance bore
+ knuckle_or = knuckle_od / 2; // 4
+ knuckle_id = pin_dia + 0.3; // 4.3mm clearance bore
knuckle_ir = knuckle_id / 2;
- knuckle_h = 6; // each knuckle height
+ knuckle_h = 6; // each knuckle segment height
// Screw holes (M3 countersunk)
screw_cs_dia = 6;
screw_cs_depth = 1;
screw_thru_dia = 3.2;
screw_count = 3;
- screw_pitch = 8; // Y spacing
- // screw column is centred on leaf_length/2 in Y, spaced 8mm apart
- // positions: -8, 0, +8 relative to leaf centre → 7, 15, 23 in Y
+ screw_pitch = 8;
- // Screw X position: middle of the leaf (away from knuckle side)
- screw_x = -(leaf_width / 2); // for left leaf (negative side)
+ // Knuckle Y centres:
+ // Left leaf (3 knuckles): segments 0,2,4 → Y centres 3, 15, 27
+ // Right leaf (2 knuckles): segments 1,3 → Y centres 9, 21
+ left_knuckle_y = [3, 15, 27];
+ right_knuckle_y = [9, 21];
- $fn = 48;
+ // The pin/knuckle axis is at X=0, Z=0.
+ // Leaf flat face is at Z=0 (top surface), body goes down to Z=-leaf_thick.
+ // Leaf plate extends from X=0 outward (left: -leaf_width, right: +leaf_width).
+ // Knuckle centre is at X=0, Z=0; lower half (Z<0) merges into plate edge.
// ─────────────────────────────────────────────
- // Helper: single countersunk hole (centred at origin, going -Z)
- module cs_hole() {
- // countersink taper (cone, wider at top)
- cylinder(h = screw_cs_depth,
- r1 = screw_cs_dia / 2,
- r2 = screw_thru_dia / 2);
- // through hole
- translate([0, 0, -leaf_thick])
- cylinder(h = leaf_thick + screw_cs_depth + 0.01,
- r = screw_thru_dia / 2);
+ // Knuckle tube, axis along Y, centred at origin
+ module knuckle_tube() {
+ rotate([90, 0, 0])
+ difference() {
+ cylinder(h = knuckle_h, r = knuckle_or, center = true);
+ cylinder(h = knuckle_h + 0.02, r = knuckle_ir, center = true);
+ }
}
// ─────────────────────────────────────────────
- // Knuckle: a tube of height knuckle_h, centred at origin, axis = Z
- module knuckle() {
- difference() {
- cylinder(h = knuckle_h, r = knuckle_or, center = true);
- cylinder(h = knuckle_h + 0.02, r = knuckle_ir, center = true);
+ // Countersunk hole: top surface at Z=0, going downward through leaf_thick
+ // Wider at top (Z=0), narrows to thru-hole diameter
+ module cs_hole() {
+ union() {
+ // countersink cone: top z=0 dia=screw_cs_dia, bottom z=-screw_cs_depth dia=screw_thru_dia
+ translate([0, 0, -screw_cs_depth])
+ cylinder(h = screw_cs_depth + 0.01,
+ r1 = screw_thru_dia / 2,
+ r2 = screw_cs_dia / 2);
+ // through hole from countersink bottom to leaf bottom
+ translate([0, 0, -(leaf_thick + 0.01)])
+ cylinder(h = leaf_thick - screw_cs_depth + 0.02,
+ r = screw_thru_dia / 2);
}
}
// ─────────────────────────────────────────────
- // Left leaf (x ≤ 0 side)
- // Leaf flat face at z = 0, body goes to z = -leaf_thick
- // Knuckles protrude above the flat face (z = 0 … knuckle_od/2 from axis)
- // but we keep knuckle axis at x=0, z=0 and orient them along Y.
- //
- // Knuckle positions along Y (knuckle centres):
- // Left leaf owns knuckles 1,3,5 → Y centres: 3, 15, 27 (0-indexed segments 0,2,4)
- // Right leaf owns knuckles 2,4 → Y centres: 9, 21 (segments 1,3)
- //
- // Knuckle axis is Y, so we rotate the tube 90° around X.
+ // Screw hole Y positions (centred on leaf_length)
+ function screw_y(i) =
+ (leaf_length - (screw_count - 1) * screw_pitch) / 2 + i * screw_pitch;
- left_knuckle_y = [3, 15, 27]; // centres in Y for left leaf
- right_knuckle_y = [9, 21]; // centres in Y for right leaf
-
- // The leaf starts at Y=0 and ends at Y=leaf_length (30).
- // Knuckle outer radius sits on the x=0 line; leaf extends to x = -leaf_width.
-
+ // ─────────────────────────────────────────────
+ // Left leaf: plate extends in -X direction, knuckles at X=0
module left_leaf() {
difference() {
union() {
- // flat plate
+ // Flat plate: from X=-leaf_width to X=0, Y=0 to Y=30, Z=-leaf_thick to Z=0
translate([-leaf_width, 0, -leaf_thick])
cube([leaf_width, leaf_length, leaf_thick]);
- // knuckles (rotated 90° so axis is Y)
+ // Knuckles at X=0 axis
for (yc = left_knuckle_y) {
translate([0, yc, 0])
- rotate([90, 0, 0])
- knuckle();
+ knuckle_tube();
}
}
- // countersunk screw holes — placed on the leaf, away from knuckle side
- // X centre at -leaf_width/2, Y positions centred on leaf
+ // Countersunk screw holes on flat part
+ // X centre at -leaf_width/2 (middle of plate away from hinge)
for (i = [0 : screw_count - 1]) {
- ypos = (leaf_length - (screw_count - 1) * screw_pitch) / 2
- + i * screw_pitch;
- translate([-leaf_width / 2, ypos, 0])
+ translate([-leaf_width / 2, screw_y(i), 0])
cs_hole();
}
+
+ // Remove pin bore through all knuckles
+ translate([0, -1, 0])
+ rotate([-90, 0, 0])
+ cylinder(h = pin_length + 2, r = knuckle_ir);
}
}
+ // ─────────────────────────────────────────────
+ // Right leaf: plate extends in +X direction, knuckles at X=0
module right_leaf() {
difference() {
union() {
- // flat plate
+ // Flat plate: from X=0 to X=+leaf_width
translate([0, 0, -leaf_thick])
cube([leaf_width, leaf_length, leaf_thick]);
- // knuckles
+ // Knuckles at X=0 axis
for (yc = right_knuckle_y) {
translate([0, yc, 0])
- rotate([90, 0, 0])
- knuckle();
+ knuckle_tube();
}
}
- // countersunk screw holes
+ // Countersunk screw holes
for (i = [0 : screw_count - 1]) {
- ypos = (leaf_length - (screw_count - 1) * screw_pitch) / 2
- + i * screw_pitch;
- translate([leaf_width / 2, ypos, 0])
+ translate([leaf_width / 2, screw_y(i), 0])
cs_hole();
}
+
+ // Remove pin bore through all knuckles
+ translate([0, -1, 0])
+ rotate([-90, 0, 0])
+ cylinder(h = pin_length + 2, r = knuckle_ir);
}
}
// ─────────────────────────────────────────────
- // Pin: along Y axis, centred so it overhangs 1mm at each end
+ // Pin: Y from -1 to +31 (1mm overhang each end)
module pin() {
- translate([0, -1, 0]) // shift so Y=-1 … Y=31
+ translate([0, -1, 0])
rotate([-90, 0, 0])
cylinder(h = pin_length, r = pin_r);
}
// ─────────────────────────────────────────────
- // Assembly — 180° open: both leaves in the same Z=0 plane
- color("silver", 0.9) left_leaf();
- color("silver", 0.9) right_leaf();
- color("gold", 1.0) pin();
+ // Assembly
+ color([0.75, 0.75, 0.78], 1.0) left_leaf();
+ color([0.75, 0.75, 0.78], 1.0) right_leaf();
+ color([0.85, 0.70, 0.20], 1.0) pin();
SCAD (142 lines)
// Butt Hinge - 180° open position
// Pin axis along Y, leaves extend in -X and +X directions
$fn = 64;
// Parameters
leaf_width = 25; // X extent of flat plate portion
leaf_length = 30; // Y direction (along pin)
leaf_thick = 2; // Z thickness
pin_dia = 4;
pin_r = pin_dia / 2;
pin_length = 32; // 1mm overhang each end (-1 to 31)
knuckle_od = 8;
knuckle_or = knuckle_od / 2; // 4
knuckle_id = pin_dia + 0.3; // 4.3mm clearance bore
knuckle_ir = knuckle_id / 2;
knuckle_h = 6; // each knuckle segment height
// Screw holes (M3 countersunk)
screw_cs_dia = 6;
screw_cs_depth = 1;
screw_thru_dia = 3.2;
screw_count = 3;
screw_pitch = 8;
// Knuckle Y centres:
// Left leaf (3 knuckles): segments 0,2,4 → Y centres 3, 15, 27
// Right leaf (2 knuckles): segments 1,3 → Y centres 9, 21
left_knuckle_y = [3, 15, 27];
right_knuckle_y = [9, 21];
// The pin/knuckle axis is at X=0, Z=0.
// Leaf flat face is at Z=0 (top surface), body goes down to Z=-leaf_thick.
// Leaf plate extends from X=0 outward (left: -leaf_width, right: +leaf_width).
// Knuckle centre is at X=0, Z=0; lower half (Z<0) merges into plate edge.
// ─────────────────────────────────────────────
// Knuckle tube, axis along Y, centred at origin
module knuckle_tube() {
rotate([90, 0, 0])
difference() {
cylinder(h = knuckle_h, r = knuckle_or, center = true);
cylinder(h = knuckle_h + 0.02, r = knuckle_ir, center = true);
}
}
// ─────────────────────────────────────────────
// Countersunk hole: top surface at Z=0, going downward through leaf_thick
// Wider at top (Z=0), narrows to thru-hole diameter
module cs_hole() {
union() {
// countersink cone: top z=0 dia=screw_cs_dia, bottom z=-screw_cs_depth dia=screw_thru_dia
translate([0, 0, -screw_cs_depth])
cylinder(h = screw_cs_depth + 0.01,
r1 = screw_thru_dia / 2,
r2 = screw_cs_dia / 2);
// through hole from countersink bottom to leaf bottom
translate([0, 0, -(leaf_thick + 0.01)])
cylinder(h = leaf_thick - screw_cs_depth + 0.02,
r = screw_thru_dia / 2);
}
}
// ─────────────────────────────────────────────
// Screw hole Y positions (centred on leaf_length)
function screw_y(i) =
(leaf_length - (screw_count - 1) * screw_pitch) / 2 + i * screw_pitch;
// ─────────────────────────────────────────────
// Left leaf: plate extends in -X direction, knuckles at X=0
module left_leaf() {
difference() {
union() {
// Flat plate: from X=-leaf_width to X=0, Y=0 to Y=30, Z=-leaf_thick to Z=0
translate([-leaf_width, 0, -leaf_thick])
cube([leaf_width, leaf_length, leaf_thick]);
// Knuckles at X=0 axis
for (yc = left_knuckle_y) {
translate([0, yc, 0])
knuckle_tube();
}
}
// Countersunk screw holes on flat part
// X centre at -leaf_width/2 (middle of plate away from hinge)
for (i = [0 : screw_count - 1]) {
translate([-leaf_width / 2, screw_y(i), 0])
cs_hole();
}
// Remove pin bore through all knuckles
translate([0, -1, 0])
rotate([-90, 0, 0])
cylinder(h = pin_length + 2, r = knuckle_ir);
}
}
// ─────────────────────────────────────────────
// Right leaf: plate extends in +X direction, knuckles at X=0
module right_leaf() {
difference() {
union() {
// Flat plate: from X=0 to X=+leaf_width
translate([0, 0, -leaf_thick])
cube([leaf_width, leaf_length, leaf_thick]);
// Knuckles at X=0 axis
for (yc = right_knuckle_y) {
translate([0, yc, 0])
knuckle_tube();
}
}
// Countersunk screw holes
for (i = [0 : screw_count - 1]) {
translate([leaf_width / 2, screw_y(i), 0])
cs_hole();
}
// Remove pin bore through all knuckles
translate([0, -1, 0])
rotate([-90, 0, 0])
cylinder(h = pin_length + 2, r = knuckle_ir);
}
}
// ─────────────────────────────────────────────
// Pin: Y from -1 to +31 (1mm overhang each end)
module pin() {
translate([0, -1, 0])
rotate([-90, 0, 0])
cylinder(h = pin_length, r = pin_r);
}
// ─────────────────────────────────────────────
// Assembly
color([0.75, 0.75, 0.78], 1.0) left_leaf();
color([0.75, 0.75, 0.78], 1.0) right_leaf();
color([0.85, 0.70, 0.20], 1.0) pin();