vibe-openscad

iter-png-1/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 9.9s · 1938/890t · $0.0319
SCAD (63 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 - bottom_thickness + 0.01);
    }
}

module handle() {
    // 取手は XZ 平面上に置いた 2D D 字形状を作り、Y 方向に押し出す
    // 取手全体: 高さ(Z) = handle_inner_h + 2*handle_thickness
    //          幅(X)  = handle_inner_w + handle_thickness(本体側の壁分)
    
    handle_outer_h = handle_inner_h + 2 * handle_thickness; // Z 方向
    handle_outer_w = handle_inner_w + handle_thickness;     // X 方向
    
    z_center = height / 2;
    // 本体外周に少し食い込ませて確実に union
    x_base = outer_d/2 - 1;
    
    translate([x_base, 0, z_center])
        rotate([90, 0, 0])  // XZ平面の2D図形をXY平面で描き、Y押し出し→rotateで縦に
            translate([0, 0, -handle_thickness/2])
                linear_extrude(height = handle_thickness)
                    difference() {
                        // 外形 D 字 (XY平面で X方向に伸びる、Y軸が高さ方向)
                        hull() {
                            // 本体側の直線部(Y軸方向の薄い長方形)
                            translate([0, 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])
                                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

runIditer-png-1_claude-opus-4-7-060f7c26a53c-2026-04-28T18-55-49-396Z
matrixIditer-png-1/claude-opus-4-7
signature060f7c26a53c1c2c…
provideranthropic
modelclaude-opus-4-7
harnessbare
statussuccess
duration9.91s (wallclock: load + prompt eval + generation + network)
tokens1938 in / 890 out
wallclock tok/s89.8 tok/s (end-to-end)
cost$0.0319
createdAt2026-04-28T18:55:49.396Z
gitCommit781e6c683dda
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。