vibe-openscad

iter-png-1/gpt-5.3-codex / tier-2-offset-handle-mug

success tier 2

bare (gpt 5.3 codex)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 8.8s · 1641/603t · $0.0097
SCAD (69 lines)
$fn = 128;

// ===== Mug dimensions =====
outer_d  = 80;   // mm
inner_d  = 70;   // mm
mug_h    = 90;   // mm
bottom_t = 6;    // mm

// ===== Handle inner opening requirement =====
// inner void: height 30mm (Z) x width 25mm (radial X)
void_h = 30;
void_w = 25;

// ===== Handle thickness =====
t_radial = 5;    // ring thickness in XZ profile
t_depth  = 10;   // thickness along Y

r_outer = outer_d / 2;

// Centers for vertical placement (middle of mug)
zc = mug_h / 2;
zi0 = zc - void_h/2;
zi1 = zc + void_h/2;

// D-profile radii (in XZ)
ri = void_h / 2;          // inner semicircle radius = 15
ro = ri + t_radial;       // outer semicircle radius = 20

// X positions so inner flat side touches mug at +X tangent plane
x_flat_inner = r_outer;               // contact plane with mug
x_flat_outer = x_flat_inner + t_radial;

x_ci = x_flat_inner + void_w;         // inner semicircle center x
x_co = x_flat_outer + void_w + t_radial; // outer semicircle center x

module d_profile(x_flat, z0, z1, x_c, r) {
    polygon(points = concat(
        [[x_flat, z0], [x_flat, z1]],
        [for (a = [90:-2:-90]) [x_c + r*cos(a), zc + r*sin(a)]]
    ));
}

module mug_body() {
    difference() {
        cylinder(h = mug_h, d = outer_d);
        translate([0,0,bottom_t])
            cylinder(h = mug_h - bottom_t + 0.01, d = inner_d);
    }
}

module handle() {
    // D-ring extruded along Y and centered at y=0
    difference() {
        translate([0, -t_depth/2, 0])
            rotate([-90,0,0])
                linear_extrude(height = t_depth)
                    d_profile(x_flat_outer, zi0 - t_radial, zi1 + t_radial, x_co, ro);

        translate([0, -(t_depth/2 + 0.1), 0])
            rotate([-90,0,0])
                linear_extrude(height = t_depth + 0.2)
                    d_profile(x_flat_inner, zi0, zi1, x_ci, ri);
    }
}

union() {
    mug_body();
    handle();   // attached on +X side only
}
パラメータ (8)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-1_gpt-5.3-codex-e163463daf93-2026-04-28T19-17-59-779Z
matrixIditer-png-1/gpt-5.3-codex
signaturee163463daf93ab14…
provideropenai
modelgpt-5.3-codex
harnessbare
statussuccess
duration8.82s (wallclock: load + prompt eval + generation + network)
tokens1641 in / 603 out
wallclock tok/s68.3 tok/s (end-to-end)
cost$0.0097
createdAt2026-04-28T19:17:59.779Z
gitCommit781e6c683dda
openscadOpenSCAD version 2026.04.27

iteration chain

各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。

prompt

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

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

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

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