SCAD (114 lines)
$fn = 64;
// Dimensions
leaf_len = 30;
leaf_width = 25;
leaf_thick = 2;
pin_d = 4;
pin_r = pin_d / 2;
pin_len = 32;
knuckle_len = 6;
knuckle_od = 8;
knuckle_r = knuckle_od / 2;
knuckle_id = 4.6;
knuckle_ir = knuckle_id / 2;
hole_d = 3.2;
hole_r = hole_d / 2;
csk_d = 6;
csk_r = csk_d / 2;
csk_depth = 1;
plate_z = 0;
axis_z = plate_z + leaf_thick / 2;
// Cylinder along the Y axis
module y_cylinder(r, h, y0, x = 0, z = axis_z) {
translate([x, y0, z])
rotate([-90, 0, 0])
cylinder(r = r, h = h);
}
// Countersunk through-hole along Z
module countersunk_hole(x, y) {
union() {
translate([x, y, plate_z - 0.1])
cylinder(r = hole_r, h = leaf_thick + 0.2);
translate([x, y, plate_z + leaf_thick - csk_depth])
cylinder(
r1 = hole_r,
r2 = csk_r,
h = csk_depth + 0.01
);
}
}
// Left leaf: x < 0, knuckles at segments 0, 2, 4
module left_leaf() {
difference() {
union() {
// Flat leaf plate
translate([-leaf_width, 0, plate_z])
cube([leaf_width, leaf_len, leaf_thick]);
// Three knuckles
for (y0 = [0, 12, 24]) {
y_cylinder(knuckle_r, knuckle_len, y0);
}
}
// Knuckle bores
for (y0 = [0, 12, 24]) {
y_cylinder(knuckle_ir, knuckle_len + 0.2, y0 - 0.1);
}
// Three M3 countersunk holes
for (y = [7, 15, 23]) {
countersunk_hole(-15, y);
}
}
}
// Right leaf: x > 0, knuckles at segments 1, 3
module right_leaf() {
difference() {
union() {
// Flat leaf plate
translate([0, 0, plate_z])
cube([leaf_width, leaf_len, leaf_thick]);
// Two knuckles
for (y0 = [6, 18]) {
y_cylinder(knuckle_r, knuckle_len, y0);
}
}
// Knuckle bores
for (y0 = [6, 18]) {
y_cylinder(knuckle_ir, knuckle_len + 0.2, y0 - 0.1);
}
// Three M3 countersunk holes
for (y = [7, 15, 23]) {
countersunk_hole(15, y);
}
}
}
// Pin axis, extending 1 mm beyond each end of the 30 mm knuckle stack
module hinge_pin() {
color("silver")
y_cylinder(pin_r, pin_len, -1);
}
// Assembly
color("dimgray")
left_leaf();
color("dimgray")
right_leaf();
hinge_pin();