vibe-openscad

iter-png-2/gemini-2.5-pro / tier-2-offset-handle-mug

success tier 2

bare (gemini 2.5 pro)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 48.5s · 1449/822t · $0.0100
SCAD (68 lines)
$fn = 100; // 滑らかな曲線にするための解像度

// --- 本体パラメータ ---
mug_outer_d = 80;
mug_inner_d = 70;
mug_h = 90;
mug_bottom_thickness = 6;

// --- 取手パラメータ ---
handle_inner_h = 30;        // 指を入れる空間の高さ
handle_inner_w = 25;        // 指を入れる空間の幅 (本体からの距離)
handle_thickness = 8;       // 取手の肉厚
handle_y_width = 12;        // 取手の奥行き (Y軸方向の太さ)

// 本体と取手を結合
union() {
    // 1. マグ本体
    difference() {
        // 外側の円筒
        cylinder(h = mug_h, d = mug_outer_d);
        
        // 内側をくり抜くための円筒
        // 底面の厚みを残すために Z 方向にずらす
        translate([0, 0, mug_bottom_thickness])
            cylinder(h = mug_h + 1, d = mug_inner_d); // 確実に貫通させるため少し高くする
    }

    // 2. 取手
    // 取手全体の高さを計算
    handle_outer_h = handle_inner_h + 2 * handle_thickness;
    // 取手をマグカップの高さ方向中央に配置するためのZ座標を計算
    handle_z_pos = (mug_h - handle_outer_h) / 2;

    // 取手を+X軸方向に配置
    // 本体に少しめり込ませて確実に接続する
    translate([mug_outer_d/2 - 1, 0, handle_z_pos]) {
        // difference() を使って、ソリッドのD字形状から内側の穴をくり抜く
        difference() {
            // --- 外側のソリッドD字形状 ---
            // hull() を使い、直線部(cube)と曲線部(cylinder)を滑らかに繋ぐ
            hull() {
                // 本体との接続部 (D字の直線部分)
                translate([0, -handle_y_width/2, 0])
                    cube([handle_thickness, handle_y_width, handle_outer_h]);
                
                // D字のカーブ部分
                // 円筒の中心を、指を入れる空間のさらに奥に配置
                translate([handle_thickness + handle_inner_w, 0, handle_outer_h / 2])
                    rotate([0, 90, 0])
                        cylinder(h = handle_y_width, r = handle_outer_h / 2, center = true);
            }
            
            // --- 内側のくり抜き穴 ---
            // 確実に貫通させるためにX,Y方向に少し大きくする
            translate([-2, -handle_y_width/2 - 1, handle_thickness]) {
                 // くり抜く形状もhullで作成し、内側の角を滑らかにする
                 hull() {
                    // 直線部分の穴
                    cube([handle_inner_w, handle_y_width + 2, handle_inner_h]);
                    
                    // 曲線部分の穴
                    translate([handle_inner_w, 0, handle_inner_h / 2])
                        cylinder(h = handle_y_width + 2, r = handle_inner_h / 2, center=true);
                 }
            }
        }
    }
}
パラメータ (8)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-2_gemini-2.5-pro-2a5a38cd3798-2026-04-28T18-58-10-064Z
matrixIditer-png-2/gemini-2.5-pro
signature2a5a38cd3798b325…
providergoogle
modelgemini-2.5-pro
harnessbare
statussuccess
duration48.51s (wallclock: load + prompt eval + generation + network)
tokens1449 in / 822 out
wallclock tok/s16.9 tok/s (end-to-end)
cost$0.0100
createdAt2026-04-28T18:58:10.064Z
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。