vibe-openscad

bare-high/gpt-5.6-terra / tier-2-offset-handle-mug

success tier 2

bare (gpt 5.6 terra)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 32.4s · 273/2607t · $0.0318
SCAD (69 lines)
$fn = 96;

// マグ本体寸法
outer_diameter = 80;
inner_diameter = 70;
mug_height     = 90;
bottom_thick   = 6;

// 取手寸法
handle_depth      = 12;   // Y方向の厚み
handle_center_z   = 45;   // 高さ方向中央
handle_outer_r    = 30;   // 外側半円半径
handle_flat_x     = 35;   // 本体に食い込ませる直線側X座標

// 内側開口: 幅25mm × 高さ30mm
handle_inner_x    = 38;
handle_inner_rx   = 25;
handle_inner_ry   = 15;

// D字取手の2D断面
module handle_profile_2d() {
    difference() {
        // 外側: 本体側が直線、外側が半円のD字
        polygon(points =
            concat(
                [
                    for (a = [-90 : 5 : 85])
                        [
                            handle_flat_x + handle_outer_r * cos(a),
                            handle_center_z + handle_outer_r * sin(a)
                        ]
                ],
                [[handle_flat_x, handle_center_z + handle_outer_r]]
            )
        );

        // 指を入れる内側空間: 幅25mm、高さ30mm
        polygon(points =
            concat(
                [
                    for (a = [-90 : 5 : 85])
                        [
                            handle_inner_x + handle_inner_rx * cos(a),
                            handle_center_z + handle_inner_ry * sin(a)
                        ]
                ],
                [[handle_inner_x, handle_center_z + handle_inner_ry]]
            )
        );
    }
}

union() {
    // 中空マグ本体
    difference() {
        cylinder(d = outer_diameter, h = mug_height);

        // 底厚6mmを残して上面を開放
        translate([0, 0, bottom_thick])
            cylinder(d = inner_diameter, h = mug_height - bottom_thick + 1);
    }

    // +X方向側面にのみ接続する取手
    // 本体外周へ十分に食い込ませてunionする
    translate([0, handle_depth / 2, 0])
        rotate([90, 0, 0])
            linear_extrude(height = handle_depth)
                handle_profile_2d();
}
パラメータ (11) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-high_gpt-5.6-terra-7eb383c623a1-2026-09-05T10-27-28-856Z
matrixIdbare-high/gpt-5.6-terra
signature7eb383c623a1d70c…
provideropenai
modelgpt-5.6-terra
harnessbare
statussuccess
duration32.37s (wallclock: load + prompt eval + generation + network)
tokens273 in / 2607 out
wallclock tok/s80.5 tok/s (end-to-end)
cost$0.0318
createdAt2026-09-05T10:27:28.856Z
gitCommit6126da97a014
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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