vibe-openscad

iter-png-2/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.2s · 1540/632t · $0.0099
SCAD (76 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;    // wall thickness in XZ profile
t_depth  = 10;   // thickness along Y (grip depth)

// Vertical center of handle
zc = mug_h / 2;

// Mug outer radius
r_outer = outer_d / 2;

// Inner D profile (opening)
ri   = void_h / 2;         // 15
x_ci = r_outer + void_w;   // inner semicircle center X
zi0  = zc - void_h/2;
zi1  = zc + void_h/2;

// Outer D profile (handle body), offset by t_radial
ro   = ri + t_radial;                 // 20
x_co = x_ci + t_radial;               // keep constant radial thickness
zo0  = zi0 - t_radial;
zo1  = zi1 + t_radial;

// Ensure manifold union with mug: overlap into mug wall by epsilon
eps = 0.6;                            // small penetration for robust union
x_flat_inner = r_outer - eps;         // inner flat of handle body
x_flat_outer = x_flat_inner + t_radial;

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_body() {
    translate([0, -t_depth/2, 0])
        rotate([-90,0,0])
            linear_extrude(height = t_depth)
                d_profile(x_flat_outer, zo0, zo1, x_co, ro);
}

module handle_hole() {
    translate([0, -(t_depth/2 + 0.1), 0])
        rotate([-90,0,0])
            linear_extrude(height = t_depth + 0.2)
                d_profile(r_outer, zi0, zi1, x_ci, ri); // flat side exactly at mug tangent
}

union() {
    mug_body();
    difference() {
        handle_body();
        handle_hole();
    }
}
パラメータ (9)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIditer-png-2_gpt-5.3-codex-ddbf6dc3310d-2026-04-28T19-18-11-358Z
matrixIditer-png-2/gpt-5.3-codex
signatureddbf6dc3310d75fc…
provideropenai
modelgpt-5.3-codex
harnessbare
statussuccess
duration8.21s (wallclock: load + prompt eval + generation + network)
tokens1540 in / 632 out
wallclock tok/s77.0 tok/s (end-to-end)
cost$0.0099
createdAt2026-04-28T19:18:11.359Z
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。