vibe-openscad

bare/gemini-3.5-flash-lite / tier-2-offset-handle-mug

success tier 2

bare (gemini 3.5 flash-lite)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 2.7s · 232/642t · $0.0017
SCAD (60 lines)
// マグカップのパラメータ
outer_dia = 80;
inner_dia = 70;
height = 90;
bottom_thick = 6;
wall_thick = (outer_dia - inner_dia) / 2; // 5mm

// 取手のパラメータ
handle_inner_w = 25; // X方向の幅 (本体からの突き出し量)
handle_inner_h = 30; // Z方向の高さ
handle_thick = 12;   // 取手の太さ (Y方向の厚み)
handle_bar_d = 12;   // D字の太さ

// 円滑な描画のための設定
$fn = 120;

module mug() {
    // メインボディと取手を一体化
    union() {
        // 1. マグカップ本体 (中空の円筒)
        difference() {
            // 外側の円筒
            cylinder(h = height, d = outer_dia);
            
            // 内側のくり抜き (底面を6mm残す)
            translate([0, 0, bottom_thick])
                cylinder(h = height - bottom_thick + 1, d = inner_dia);
        }

        // 2. 指定方向(+X軸方向)の取手
        // マグの高さ方向の中央に配置
        z_pos = (height - handle_inner_h) / 2;
        
        // 本体との確実に結合するための埋め込み幅
        embed = 3; 
        
        translate([outer_dia / 2 - embed, 0, z_pos]) {
            // D字型の取手を作成
            // Y軸中心に対象にするため、全体をY方向にオフセット
            translate([0, -handle_thick / 2, 0]) {
                hull() {
                    // 取手の上部固定部
                    translate([0, handle_thick / 2, 0])
                        cube([embed + handle_inner_w - handle_thick/2, handle_thick, handle_bar_d]);
                    
                    // 取手の下部固定部
                    translate([0, handle_thick / 2, handle_inner_h - handle_bar_d])
                        cube([embed + handle_inner_w - handle_thick/2, handle_thick, handle_bar_d]);
                    
                    // 取手の外側アール部分 (半円)
                    translate([handle_inner_w - handle_bar_d/2, handle_thick / 2, handle_bar_d/2])
                        cylinder(h = handle_inner_h - handle_bar_d, d = handle_bar_d);
                }
            }
        }
    }
}

// 実行
mug();
パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare_gemini-3.5-flash-lite-5949b7b014aa-2026-09-05T10-41-07-952Z
matrixIdbare/gemini-3.5-flash-lite
signature5949b7b014aa8521…
providergoogle
modelgemini-3.5-flash-lite
harnessbare
statussuccess
duration2.70s (wallclock: load + prompt eval + generation + network)
tokens232 in / 642 out
wallclock tok/s237.6 tok/s (end-to-end)
cost$0.0017
createdAt2026-09-05T10:41:07.952Z
gitCommit6126da97a014
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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