vibe-openscad

iter-png-1/gemini-2.5-flash / tier-1-mug

success tier 1

bare (gemini 2.5 flash)

render
bare render of tier-1-mug
loading STL…
success 37.0s · 1071/654t · $0.0020
SCAD (57 lines)
// 定数定義
D_outer = 80;    // 外径
H_cup = 100;     // 高さ
thickness_wall = 4; // 肉厚
thickness_bottom = 6; // 底面の厚み

R_handle_tube = 12; // 取手のチューブの半径 (取手自体の半径)
D_finger_hole = 40; // 指が通る穴の直径 (適当な値、調整可能)

// 半径計算
R_outer = D_outer / 2;
R_inner = R_outer - thickness_wall;
R_finger_hole = D_finger_hole / 2;

// マグカップ本体
module mug_body() {
    difference() {
        // 外側の円筒
        cylinder(h = H_cup, r = R_outer, center = false, $fn = 60);

        // 内側をくり抜く円筒
        translate([0, 0, thickness_bottom]) {
            // Z-fightingを避けるため、内側の円筒の高さをわずかに外側より高くする
            cylinder(h = H_cup - thickness_bottom + 0.1, r = R_inner, center = false, $fn = 60);
        }
    }
}

// 取手
module handle() {
    // torusのr1は、チューブ中心が描く円の半径
    // r1 = 指が通る穴の半径 + チューブの半径
    handle_torus_r1 = R_finger_hole + R_handle_tube;

    // 取手の中心X座標
    // カップの表面(R_outer)に取手の内側が接するように配置する
    // torusのX方向の厚みは 2 * R_handle_tube なので、中心X座標は R_outer + R_handle_tube となる
    handle_pos_x = R_outer + R_handle_tube;

    // 取手の中心Z座標 (カップの高さの中心)
    handle_pos_z = H_cup / 2;

    // torusはデフォルトでXY平面にリングの中心が来てZ軸に穴が開く。
    // これをY軸周りに90度回転させることで、穴がX軸を向き、リングがYZ平面に広がる形にする。
    // その後、所定の位置に平行移動する。
    translate([handle_pos_x, 0, handle_pos_z]) {
        rotate([0, 90, 0]) { // Y軸周りに90度回転
            torus(r = handle_torus_r1, r2 = R_handle_tube, $fn = 60);
        }
    }
}

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

meta

runIditer-png-1_gemini-2.5-flash-5bde30968bf5-2026-04-27T17-05-14-052Z
matrixIditer-png-1/gemini-2.5-flash
signature5bde30968bf5c2c2…
providergoogle
modelgemini-2.5-flash
harnessbare
statussuccess
duration36.96s (wallclock: load + prompt eval + generation + network)
tokens1071 in / 654 out
wallclock tok/s17.7 tok/s (end-to-end)
cost$0.0020
createdAt2026-04-27T17:05:14.052Z
gitCommitaf54e116f6f8
openscadOpenSCAD version 2026.04.27

iteration chain

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

prompt

OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。
底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。
さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。
取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。

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