vibe-openscad

bare-xhigh/gpt-6-astra / tier-2-offset-handle-mug

success tier 2

bare (gpt 6 astra)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 82.5s · 273/3985t · $0.2020
SCAD (63 lines)
$fn = 192;

outer_diameter = 80;
inner_diameter = 70;
mug_height     = 90;
bottom_thickness = 6;

handle_hole_height = 30;
handle_hole_width  = 25;
handle_depth       = 10; // Y方向の厚み
handle_rim         = 5;
attachment_overlap = 3; // 本体への食い込み量

handle_base_x = outer_diameter / 2 - attachment_overlap;
handle_center_z = mug_height / 2;

// 外周を真の半円にし、開口の前後に5mmの肉を確保
handle_outer_radius = handle_hole_width + 2 * handle_rim;

epsilon = 0.02;

// 2D:+X側の半円。本体側の境界は直線。
module right_semicircle(r) {
    intersection() {
        circle(r = r);
        translate([0, -r])
            square([r, 2 * r]);
    }
}

// 2D:外周が半円、内側開口が幅25mm×高さ30mmのD字形
module handle_profile() {
    difference() {
        right_semicircle(handle_outer_radius);

        translate([handle_rim, 0])
            scale([handle_hole_width, handle_hole_height / 2])
                right_semicircle(1);
    }
}

// 取手をXZ平面に配置し、Y方向へ厚みを付ける
module handle() {
    translate([handle_base_x, 0, handle_center_z])
        rotate([90, 0, 0])
            linear_extrude(height = handle_depth, center = true)
                handle_profile();
}

difference() {
    // 取手の直線側が本体に3mm入り込み、体積を持って接続
    union() {
        cylinder(d = outer_diameter, h = mug_height);
        handle();
    }

    // 上面を開放し、底面に6mmを残す
    translate([0, 0, bottom_thickness])
        cylinder(
            d = inner_diameter,
            h = mug_height - bottom_thickness + epsilon
        );
}
パラメータ (10) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-xhigh_gpt-6-astra-e1c87b0c3de0-2026-09-05T10-13-04-177Z
matrixIdbare-xhigh/gpt-6-astra
signaturee1c87b0c3de0b645…
provideropenai
modelgpt-6-astra
harnessbare
statussuccess
duration82.51s (wallclock: load + prompt eval + generation + network)
tokens273 in / 3985 out
wallclock tok/s48.3 tok/s (end-to-end)
cost$0.2020
createdAt2026-09-05T10:13:04.177Z
gitCommitd69c2b8ad709
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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