vibe-openscad

bare/gpt-oss-120b / tier-3-butt-hinge

render_error tier 3
error
openscad stl render failed (exit 1): ERROR: Parser error: syntax error in file ../../../../../tmp/render-asWeQa/input.scad, line 54
Can't parse file '/tmp/render-asWeQa/input.scad'!

bare (openai/gpt-oss-120b)

render
no render
render_error 52.5s · 653/4837t
openscad stl render failed (exit 1): ERROR: Parser error: syntax error in file ../../../../../tmp/render-asWeQa/input.scad, line 54
Can't parse file '/tmp/render-asWeQa/input.scad'!

SCAD (102 lines)
$fn = 64;

//-------------------------------------------------
// Parameters
leaf_thick = 2;
leaf_len   = 30;
leaf_wid   = 25;

knuckle_len = 6;
knuckle_out_r = 4;
knuckle_in_r  = 2.3; // pin radius 2 + 0.3 clearance

pin_r   = 2;
pin_len = 32;

hole_dia_top = 6;   // countersink top diameter
hole_dia_bot = 3.2; // through hole diameter
hole_depth   = 1;   // countersink depth
hole_pitch   = 8;
hole_ys = [6, 14, 22]; // positions for three holes

//-------------------------------------------------
// Helper modules
module knuckle(yc) {
    // tube (outer - inner) centered at X=0, Z=0, Y=yc
    translate([0, yc, 0])
        rotate([90,0,0])
            difference() {
                cylinder(r=knuckle_out_r, h=knuckle_len, center=true);
                cylinder(r=knuckle_in_r,  h=knuckle_len, center=true);
            }
}

module countersink_hole(yc, side="left") {
    // side = "left"  -> X negative outward
    // side = "right" -> X positive outward
    sign = (side=="left") ? -1 : 1;
    // countersink cone (base on leaf surface)
    translate([sign*(leaf_thick/2 + hole_depth), yc, 0])
        rotate([0,90,0])
            cylinder(r1=hole_dia_top/2, r2=hole_dia_bot/2, h=hole_depth, center=false);
    // through hole cylinder
    translate([sign*(leaf_thick/2), yc, 0])
        rotate([0,90,0])
            cylinder(r=hole_dia_bot/2, h=leaf_thick+0.01, center=true);
}

//-------------------------------------------------
// Leaf definition
module leaf(side="left") {
    sign = (side=="left") ? -1 : 1;
    // Main block
    block = translate([sign*leaf_thick, 0, -leaf_wid/2])
                cube([leaf_thick, leaf_len, leaf_wid], center=false);
    // Knuckles (interleaved)
    knuckles = [];
    if (side=="left") {
        // sections 0,2,4  -> centers 3,15,27
        knuckles = [3, 15, 27];
    } else {
        // sections 1,3 -> centers 9,21
        knuckles = [9, 21];
    }
    // Build leaf with knuckles
    leaf_union = union() {
        block;
        for (yc = knuckles) knuckle(yc);
    }
    // Subtract countersink holes on outer side
    for (yh = hole_ys)
        difference() {
            leaf_union;
            countersink_hole(yh, side);
        }
    // The above loop would overwrite leaf_union each iteration,
    // so we instead apply subtraction in a single difference:
    difference() {
        leaf_union;
        for (yh = hole_ys)
            countersink_hole(yh, side);
    }
}

//-------------------------------------------------
// Pin definition
module pin() {
    // Pin centered in Y at leaf midpoint, extends 1mm beyond each leaf end
    translate([0, leaf_len/2, 0])
        rotate([90,0,0])
            cylinder(r=pin_r, h=pin_len, center=true);
}

//-------------------------------------------------
// Assembly
union() {
    // Left leaf (x negative side)
    leaf("left");
    // Right leaf (x positive side)
    leaf("right");
    // Pin
    pin();
}

meta

runIdbare_gpt-oss-120b-47bd72458108-2026-09-23T02-21-25-001Z
matrixIdbare/gpt-oss-120b
signature47bd72458108c803…
provideropenai-self-hosted
modelopenai/gpt-oss-120b
harnessbare
statusrender_error
duration52.49s (wallclock: load + prompt eval + generation + network)
tokens653 in / 4837 out
wallclock tok/s92.2 tok/s (end-to-end)
createdAt2026-09-23T02:21:25.001Z
gitCommitc38d83c17860
openscadOpenSCAD version 2026.09.23

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