vibe-openscad

bare/claude-opus-4-7 / tier-2-offset-handle-mug

success tier 2

bare (claude opus 4.7)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 14.5s · 348/824t · $0.0223
SCAD (65 lines)
// マグカップ

$fn = 100;

// 本体パラメータ
outer_d = 80;
inner_d = 70;
height = 90;
bottom_thickness = 6;

// 取手パラメータ
handle_inner_h = 30;   // 取手内側の高さ
handle_inner_w = 25;   // 取手内側の幅(本体からの突き出し)
handle_thickness = 8;  // 取手の太さ(指を握る部分の太さ)

module mug_body() {
    difference() {
        cylinder(d = outer_d, h = height);
        translate([0, 0, bottom_thickness])
            cylinder(d = inner_d, h = height);
    }
}

module handle() {
    // 取手の外形と内側の空間
    // 取手は +X 側に配置
    // 外側 D 形状: 全体高さ = handle_inner_h + 2*handle_thickness
    // 全体幅 = handle_inner_w + handle_thickness(本体側は本体内に埋め込む)
    
    handle_outer_h = handle_inner_h + 2 * handle_thickness;
    handle_outer_w = handle_inner_w + handle_thickness;
    
    // 中央高さに配置
    z_center = height / 2;
    
    // 本体側へ少し食い込ませて確実にunion
    x_start = outer_d/2 - 2;
    
    translate([x_start, 0, z_center])
        rotate([90, 0, 0])
            linear_extrude(height = handle_outer_h, center = true)
                difference() {
                    // 外形 D 字
                    hull() {
                        // 本体側の直線部分(細い長方形)
                        translate([0, -handle_outer_h/2 + handle_outer_h/2, 0])
                            square([0.1, handle_outer_h], center = true);
                        // 外側の半円
                        translate([handle_outer_w - handle_outer_h/2, 0])
                            circle(d = handle_outer_h);
                    }
                    // 内側の穴(D字の内側)
                    hull() {
                        translate([handle_thickness, 0, 0])
                            square([0.1, handle_inner_h], center = true);
                        translate([handle_thickness + handle_inner_w - handle_inner_h/2, 0])
                            circle(d = handle_inner_h);
                    }
                }
}

union() {
    mug_body();
    handle();
}
パラメータ (7)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare_claude-opus-4-7-6021c3cd1657-2026-04-28T10-08-31-750Z
matrixIdbare/claude-opus-4-7
signature6021c3cd1657e455…
provideranthropic
modelclaude-opus-4-7
harnessbare
statussuccess
duration14.52s (wallclock: load + prompt eval + generation + network)
tokens348 in / 824 out
wallclock tok/s56.8 tok/s (end-to-end)
cost$0.0223
createdAt2026-04-28T10:08:31.750Z
gitCommit266a4b423d4e
openscadOpenSCAD version 2026.04.27

iteration chain

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

prompt

OpenSCAD で、向きが指定されたマグカップを作ってください。

本体:
- 外径 80mm、内径 70mm(肉厚 5mm)、高さ 90mm の円筒形マグ
- 底面の厚みは 6mm
- 内側は飲み物を入れられるよう中空

取手(handle):
- マグの **+X 軸方向の側面のみ** に付ける(他の方向には付けない)
- 取手は D 字形状(外側が半円、本体側が直線)で、本体外周にしっかり接続する
- 取手の内側の空間は高さ 30mm × 幅 25mm(指 3 本ぐらい入る)
- 取手はマグの高さ方向の中央付近に付ける
- 本体と取手は確実に union され、マニフォールド(隙間や宙吊りなし)を保つ

完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。