vibe-openscad

bare-think-off/gemma-4-31b-it / tier-2-offset-handle-mug

success tier 2

bare (gemma 4 31b)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 17.8s · 232/584t · $0
SCAD (54 lines)
// パラメータ設定
outer_dia = 80;
inner_dia = 70;
height = 90;
bottom_thickness = 6;
wall_thickness = (outer_dia - inner_dia) / 2;

handle_width_inner = 25;
handle_height_inner = 30;
handle_thickness = 5;

$fn = 100;

union() {
    // --- 本体 ---
    difference() {
        // 外殻
        cylinder(d = outer_dia, h = height);
        
        // 内側の中空部分 (底面の厚みを考慮して上にずらす)
        translate([0, 0, bottom_thickness])
            cylinder(d = inner_dia, h = height);
    }

    // --- 取手 (+X軸方向) ---
    // 取手を高さ中央に配置
    translate([outer_dia/2, 0, height/2 - handle_height_inner/2]) {
        difference() {
            // 取手の外形 (D字形状)
            hull() {
                // 本体接続部の矩形
                translate([-1, -handle_height_inner/2 - handle_thickness, 0])
                    cube([1, handle_height_inner + handle_thickness * 2, handle_thickness]);
                
                // 外側の半円部分を形成するための円柱
                translate([handle_width_inner/2 + handle_thickness, 0, 0])
                    rotate([0, 90, 0])
                    cylinder(d = handle_height_inner + handle_thickness * 2, h = handle_thickness, center = true);
            }

            // 取手の内側空間 (指が入る部分)
            translate([0, 0, -1])
                cube([handle_width_inner + 1, handle_height_inner, handle_thickness + 2]);
            
            // D字の形状を整えるため、本体側へ突き抜けた部分をカット
            translate([-10, -handle_height_inner/2 - handle_thickness, -1])
                cube([10, handle_height_inner + handle_thickness * 2, handle_thickness + 2]);
        }
        
        // 取っ手の接続を確実にするための補強ブロック
        translate([-2, -handle_height_inner/2 - handle_thickness, 0])
            cube([2, handle_height_inner + handle_thickness * 2, handle_thickness]);
    }
}
パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-think-off_gemma-4-31b-it-6ab846841fd7-2026-10-06T19-38-42-282Z
matrixIdbare-think-off/gemma-4-31b-it
signature6ab846841fd7530e…
providergoogle
modelgemma-4-31b-it
harnessbare
statussuccess
duration17.82s (wallclock: load + prompt eval + generation + network)
tokens232 in / 584 out
wallclock tok/s32.8 tok/s (end-to-end)
cost$0
createdAt2026-10-06T19:38:42.282Z
gitCommitf9f85ea20c03
openscadOpenSCAD version 2026.09.23

prompt

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

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

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

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