vibe-openscad

iter-png-3/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 10.0s · 1570/668t · $0.0104
SCAD (81 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  = 12;   // thickness along Y (grip depth)

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

// Mug outer radius
r_outer = outer_d / 2;

// ----- D profile parameters (in XZ plane) -----
ri = void_h / 2;            // 15 (inner semicircle radius)
x_ci = r_outer + void_w;    // inner semicircle center X
zi0 = zc - void_h/2;
zi1 = zc + void_h/2;

// outer profile offset from inner profile
ro = ri + t_radial;         // 20
x_co = x_ci + t_radial;
zo0 = zi0 - t_radial;
zo1 = zi1 + t_radial;

// overlap into mug to guarantee manifold union
eps = 1.0;
x_flat_inner = r_outer - eps;          // inner flat of handle body enters mug
x_flat_outer = x_flat_inner + t_radial;

// D-shape polygon: flat side at x_flat, semicircle bulging to +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)]]
    ));
}

// Mug body with hollow interior and bottom thickness
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);
    }
}

// Handle solid (before carving its opening), centered on +X side
module handle_outer() {
    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);
}

// Inner void of handle (kept tangent at mug outer surface)
module handle_inner_void() {
    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);
}

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

meta

runIditer-png-3_gpt-5.3-codex-b961cf0f5b84-2026-04-28T19-18-21-407Z
matrixIditer-png-3/gpt-5.3-codex
signatureb961cf0f5b84f5f0…
provideropenai
modelgpt-5.3-codex
harnessbare
statussuccess
duration9.99s (wallclock: load + prompt eval + generation + network)
tokens1570 in / 668 out
wallclock tok/s66.8 tok/s (end-to-end)
cost$0.0104
createdAt2026-04-28T19:18:21.407Z
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。