vibe-openscad

iter-png-3/gpt-5 / tier-3-butt-hinge

success tier 3

bare (gpt 5)

render
bare render of tier-3-butt-hinge
loading STL…
success 80.2s · 2475/7718t · $0.0803
SCAD (121 lines)
// Small butt hinge (furniture) - 180° open assembly

$fn = 96;

eps = 0.02;

// Dimensions
plate_len_y   = 30;   // along Y
plate_width_x = 25;   // along X (extends away from hinge axis)
plate_thick   = 2;    // along Z

kn_seg_len = 6;       // each knuckle segment length along Y
kn_od      = 8;       // knuckle outer diameter
kn_id      = 4.6;     // knuckle inner diameter (pin + 0.3 clearance)

pin_d   = 4;
pin_len = 32;         // sticks out 1mm each end (30 + 1 + 1)

hole_pitch    = 8;    // along Y
hole_y_list   = [-8, 0, 8];
hole_x_left   = -17;  // place holes on side away from knuckle (outer side)
hole_x_right  =  17;
cs_top_d      = 6;    // countersink top diameter
cs_depth      = 1;    // countersink depth
hole_thru_d   = 3.2;  // through diameter (M3 clearance)

// Knuckle Y centers (total 30mm split into 5x6mm: centers at -12, -6, 0, 6, 12)
kn_centers_left  = [-12, 0, 12];  // outer two + center one
kn_centers_right = [-6, 6];       // intermediate two

//---------------- Modules ----------------//

module pin_axis() {
  // Along +Y, centered so ends at y=±16 (knuckles at ±15)
  rotate([-90,0,0])
    cylinder(h=pin_len, r=pin_d/2, center=true);
}

module knuckle_segment(yc) {
  // A hollow cylinder segment along Y at center yc
  translate([0, yc, 0])
    rotate([-90,0,0])
      difference() {
        cylinder(h=kn_seg_len, r=kn_od/2, center=true);
        cylinder(h=kn_seg_len + 2*eps, r=kn_id/2, center=true);
      }
}

module countersunk_hole(xc, yc) {
  // Negative shape to subtract from a plate
  union() {
    // Countersink frustum: from z=(+1 - cs_depth) up to z=+1
    translate([xc, yc, 1 - cs_depth])
      cylinder(h=cs_depth, r1=hole_thru_d/2, r2=cs_top_d/2);
    // Through hole: make it longer than plate to ensure clean subtraction
    translate([xc, yc, -3])
      cylinder(h=6, r=hole_thru_d/2);
  }
}

module plate_base(side = "left") {
  // Rectangular plate: left x∈[-25,0], right x∈[0,25], y∈[-15,15], z∈[-1,1]
  if (side == "left")
    translate([-plate_width_x, -plate_len_y/2, -plate_thick/2])
      cube([plate_width_x, plate_len_y, plate_thick], center=false);
  else
    translate([0, -plate_len_y/2, -plate_thick/2])
      cube([plate_width_x, plate_len_y, plate_thick], center=false);
}

module plate_with_features(side = "left") {
  // Subtract countersunk holes and cutouts for the opposite knuckle segments
  difference() {
    plate_base(side);

    // Countersunk holes (on the far side from knuckle)
    if (side == "left")
      for (yy = hole_y_list)
        countersunk_hole(hole_x_left, yy);
    else
      for (yy = hole_y_list)
        countersunk_hole(hole_x_right, yy);

    // Cutouts to avoid interference with the opposite leaf's knuckles
    if (side == "left") {
      for (yc = kn_centers_right)
        translate([0, yc, 0])
          rotate([-90,0,0])
            cylinder(h=kn_seg_len + 2*eps, r=kn_od/2 + eps, center=true);
    } else {
      for (yc = kn_centers_left)
        translate([0, yc, 0])
          rotate([-90,0,0])
            cylinder(h=kn_seg_len + 2*eps, r=kn_od/2 + eps, center=true);
    }
  }
}

module leaf_assembly(side = "left") {
  union() {
    plate_with_features(side);
    if (side == "left") {
      for (yc = kn_centers_left)
        knuckle_segment(yc);
    } else {
      for (yc = kn_centers_right)
        knuckle_segment(yc);
    }
  }
}

//---------------- Assembly ----------------//

// Left leaf (x < 0)
color([0.7,0.7,0.75]) leaf_assembly("left");

// Right leaf (x > 0)
color([0.7,0.7,0.75]) leaf_assembly("right");

// Shared pin axis
color([0.85,0.85,0.85]) pin_axis();
パラメータ (15)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-3_gpt-5-6b3971fd944f-2026-04-28T17-34-53-151Z
matrixIditer-png-3/gpt-5
signature6b3971fd944f2dfc…
provideropenai
modelgpt-5-2025-08-07
harnessbare
statussuccess
duration80.20s (wallclock: load + prompt eval + generation + network)
tokens2475 in / 7718 out
wallclock tok/s96.2 tok/s (end-to-end)
cost$0.0803
createdAt2026-04-28T17:34:53.151Z
gitCommitbe87c9f2adaf
openscadOpenSCAD version 2026.04.27

iteration chain

各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。

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 ... ``` のフェンスで囲んで出力してください。
コードのみで、追加の説明は不要です。