bare/gpt-5.3-codex / tier-3-butt-hinge
success tier 3
bare (gpt 5.3 codex)
render
$fn = 96;
// ===== Parameters =====
leaf_len_y = 30; // along hinge axis
leaf_width_x = 25; // opening direction
leaf_thick_z = 2;
pin_d = 4;
pin_r = pin_d/2;
pin_len = 32;
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
csk_thru_d = 3.2;
csk_head_d = 6;
csk_depth = 1;
y0 = -leaf_len_y/2; // start of knuckle stack (-15)
z_face = leaf_thick_z/2; // plates occupy z in [-1, +1]
// Knuckle segment centers (5 equal 6mm segments across 30mm)
function seg_center(i) = y0 + knuckle_seg*i + knuckle_seg/2;
// Left leaf has segments: 0,2,4
left_idx = [0,2,4];
// Right leaf has segments: 1,3
right_idx = [1,3];
// Screw hole Y positions (8mm pitch, centered)
hole_y = [-8, 0, 8];
// ===== Modules =====
module countersunk_hole(z0, z1) {
// through hole
translate([0,0,z0-0.1])
cylinder(h=(z1-z0)+0.2, r=csk_thru_d/2);
// tapered countersink from top surface
// top diameter 6, bottom diameter 3.2, depth 1
translate([0,0,z1-csk_depth])
cylinder(h=csk_depth+0.01, r1=csk_thru_d/2, r2=csk_head_d/2);
}
module leaf_base(side=1) {
// side=+1 => right leaf (x>0), side=-1 => left leaf (x<0)
x0 = (side > 0) ? 0 : -leaf_width_x;
translate([x0, y0, -leaf_thick_z/2])
cube([leaf_width_x, leaf_len_y, leaf_thick_z], center=false);
}
module knuckle_shell(yc, side=1) {
// Outer knuckle body attached to leaf edge at x=0
intersection() {
translate([0, yc, 0])
rotate([90,0,0])
cylinder(h=knuckle_seg, r=knuckle_or, center=true);
// keep half by side
translate([(side>0)?0:-knuckle_or, yc-knuckle_seg/2-0.01, -knuckle_or-0.01])
cube([knuckle_or, knuckle_seg+0.02, 2*knuckle_or+0.02], center=false);
}
}
module leaf_with_knuckles(side=1) {
difference() {
union() {
leaf_base(side);
idxs = (side > 0) ? right_idx : left_idx;
for (i = idxs)
knuckle_shell(seg_center(i), side);
}
// knuckle bore (only where material exists)
for (i = (side > 0) ? right_idx : left_idx) {
translate([0, seg_center(i), 0])
rotate([90,0,0])
cylinder(h=knuckle_seg+0.2, r=knuckle_ir, center=true);
}
// 3 countersunk holes near free edge of each leaf
hx = (side > 0) ? (leaf_width_x - 5) : (-leaf_width_x + 5);
for (yy = hole_y) {
translate([hx, yy, 0])
countersunk_hole(-leaf_thick_z/2, leaf_thick_z/2);
}
}
}
module pin_axis() {
translate([0, 0, 0])
rotate([90,0,0])
cylinder(h=pin_len, r=pin_r, center=true);
}
// ===== Assembly (180° open) =====
union() {
leaf_with_knuckles(-1); // left, x<0
leaf_with_knuckles( 1); // right, x>0
pin_axis();
} パラメータ (11) —
スライダを動かすと openscad-wasm で再レンダリング
iteration chain
各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。
→ children (1)
prompt
OpenSCAD で、家具用の小型バット蝶番(butt hinge)を作ってください。 3 つのパーツ(左板、右板、ピン軸)が組み合わさって動作する完成品を、 「開いた状態(180°)」で 1 つの SCAD ファイルに配置して出力します。 寸法と配置: - 板(leaf)2 枚: 30mm × 25mm × 厚さ 2mm の鉄板形状 - 縦 30mm の辺がピン軸に沿う(ヒンジ軸方向) - 横 25mm の辺が回転で開く方向に伸びる - ピン軸: 直径 4mm の円柱、長さ 32mm(両端 1mm ずつ knuckle から飛び出す) - knuckle(筒部): 縦 30mm を 5 等分(各 6mm)に区切り、左板に 3 個・右板に 2 個を 互い違いに配置(左板は外側 2 個 + 中央 1 個、右板は中間 2 個) - knuckle 外径 8mm、内径はピン軸 + 0.3mm クリアランス(= 4.6mm 穴) - 左板と右板はピン軸を共有して回転可能。180° 開いた状態で、両板の 平らな面が同一平面に来るように配置する - 各板の knuckle から離れた側に、M3 用の皿穴を 3 個ずつ (穴ピッチは板の縦方向に 8mm 間隔、皿穴は表面から見て直径 6mm × 深さ 1mm のテーパ + 直径 3.2mm の貫通穴) 座標系: - ピン軸の中心線を Y 軸に重ねる(ピン軸は +Y 方向) - 板の平らな面は Z 軸に直交し、左板が x<0 側、右板が x>0 側に伸びる(180° 開) - knuckle は X=0 を中心とし、Y 方向に 6mm ずつ並ぶ 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。 コードのみで、追加の説明は不要です。