vibe-openscad

bare-think-off/gemini-3.5-flash / tier-2-offset-handle-mug

success tier 2

bare (gemini 3.5 flash)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 4.0s · 232/690t · $0.0066
SCAD (68 lines)
// マグカップのパラメータ
body_outer_dia = 80;
body_inner_dia = 70;
body_height = 90;
bottom_thickness = 6;

// 取っ手のパラメータ
handle_inner_h = 30;
handle_inner_w = 25;
handle_thickness = 10; // 取っ手の太さ

$fn = 100; // 円の分割数(滑らかさ)

module mug_body() {
    difference() {
        // 外側円筒
        cylinder(d = body_outer_dia, h = body_height);
        
        // 内側中空部分(底の厚みを残す)
        translate([0, 0, bottom_thickness])
            cylinder(d = body_inner_dia, h = body_height - bottom_thickness + 1);
    }
}

module mug_handle() {
    // 取っ手の中心位置をマグの中央高さに合わせ、+X方向に配置
    handle_y_offset = body_height / 2;
    handle_x_offset = body_outer_dia / 2 - 2; // 少し本体にめり込ませてunionを確実にする

    translate([handle_x_offset, 0, handle_y_offset]) {
        rotate([90, 0, 90]) { // YZ平面に沿うように回転
            difference() {
                // 取っ手の外形(D字型の角丸長方形を表現するために2D offsetを使用)
                linear_extrude(height = handle_thickness, center = true) {
                    difference() {
                        // 外側の輪郭
                        hull() {
                            translate([0, -(handle_inner_h/2 + handle_thickness)])
                                circle(r = handle_thickness);
                            translate([0, handle_inner_h/2 + handle_thickness])
                                circle(r = handle_thickness);
                            translate([handle_inner_w + handle_thickness, 0])
                                circle(r = handle_inner_h/2 + handle_thickness);
                        }
                        // 内側の穴
                        hull() {
                            translate([0, -handle_inner_h/2])
                                circle(r = 0.1);
                            translate([0, handle_inner_h/2])
                                circle(r = 0.1);
                            translate([handle_inner_w, 0])
                                circle(r = handle_inner_h/2);
                        }
                        // 本体側(X<=0)をカットして平らにし、接続を安定させる
                        translate([-handle_thickness*2, -(handle_inner_h + handle_thickness*2)])
                            square([handle_thickness*2, (handle_inner_h + handle_thickness*2)*2]);
                    }
                }
            }
        }
    }
}

// 本体と取っ手の結合
union() {
    mug_body();
    mug_handle();
}
パラメータ (7)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-think-off_gemini-3.5-flash-86addbd4af77-2026-05-20T00-15-05-739Z
matrixIdbare-think-off/gemini-3.5-flash
signature86addbd4af77de32…
providergoogle
modelgemini-3.5-flash
harnessbare
statussuccess
duration4.01s (wallclock: load + prompt eval + generation + network)
tokens232 in / 690 out
wallclock tok/s172.2 tok/s (end-to-end)
cost$0.0066
createdAt2026-05-20T00:15:05.739Z
gitCommitc16a216592f0
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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