vibe-openscad

bare-max/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 124.1s · 273/6273t · $0.3164
SCAD (76 lines)
$fn = 192;

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

opening_height = 30;
opening_width = 25;
handle_depth = 12;

handle_overlap = 3;
opening_clearance = 1;
handle_outer_wall = 6;

handle_x = outer_diameter / 2 - handle_overlap;
handle_spine = handle_overlap + opening_clearance;
handle_outer_radius = handle_spine + opening_width + handle_outer_wall;

eps = 0.1;

// 2D の +X 側半楕円。rx == ry の場合は半円。
module positive_x_half_ellipse(rx, ry) {
    intersection() {
        scale([rx, ry])
            circle(r = 1);

        translate([0, -ry - eps])
            square([rx + eps, 2 * ry + 2 * eps]);
    }
}

module mug_body() {
    difference() {
        cylinder(d = outer_diameter, h = mug_height);

        translate([0, 0, bottom_thickness])
            cylinder(
                d = inner_diameter,
                h = mug_height - bottom_thickness + eps
            );
    }
}

module d_handle() {
    // XZ 平面に配置し、Y 方向に厚みを持たせる。
    // 本体側の直線部分を外壁に 3 mm 食い込ませる。
    translate([handle_x, 0, mug_height / 2])
        rotate([90, 0, 0])
            linear_extrude(
                height = handle_depth,
                center = true,
                convexity = 10
            )
                difference() {
                    // 外周:+X 側が半円、本体側が直線。
                    positive_x_half_ellipse(
                        handle_outer_radius,
                        handle_outer_radius
                    );

                    // 開口:幅 25 mm × 高さ 30 mm。
                    // 全体を本体外周より外側に置き、空間を確保する。
                    translate([handle_spine, 0])
                        positive_x_half_ellipse(
                            opening_width,
                            opening_height / 2
                        );
                }
}

render(convexity = 10)
    union() {
        mug_body();
        d_handle();
    }
パラメータ (11) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-max_gpt-6-astra-3402f3a08122-2026-09-05T10-15-08-281Z
matrixIdbare-max/gpt-6-astra
signature3402f3a081229b34…
provideropenai
modelgpt-6-astra
harnessbare
statussuccess
duration124.09s (wallclock: load + prompt eval + generation + network)
tokens273 in / 6273 out
wallclock tok/s50.6 tok/s (end-to-end)
cost$0.3164
createdAt2026-09-05T10:15:08.281Z
gitCommitd69c2b8ad709
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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