vibe-openscad

bare/claude-opus-4-5 / tier-2-offset-handle-mug

success tier 2

bare (claude opus 4.5)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 11.4s · 330/709t · $0.0194
SCAD (73 lines)
// Mug parameters
outer_diameter = 80;
inner_diameter = 70;
mug_height = 90;
bottom_thickness = 6;
wall_thickness = 5;

// Handle parameters
handle_inner_height = 30;
handle_inner_width = 25;
handle_thickness = 8;

// Derived values
outer_radius = outer_diameter / 2;
inner_radius = inner_diameter / 2;

// Handle position (centered vertically)
handle_center_z = mug_height / 2;

module mug_body() {
    difference() {
        // Outer cylinder
        cylinder(h = mug_height, r = outer_radius, $fn = 100);
        
        // Inner cavity (hollow part for liquid)
        translate([0, 0, bottom_thickness])
            cylinder(h = mug_height - bottom_thickness + 1, r = inner_radius, $fn = 100);
    }
}

module handle() {
    // Handle dimensions
    handle_outer_height = handle_inner_height + 2 * handle_thickness;
    handle_outer_width = handle_inner_width + handle_thickness;
    
    // Position handle on +X side
    handle_x_offset = outer_radius - 2; // Overlap with mug body for solid union
    
    translate([handle_x_offset, 0, handle_center_z - handle_outer_height / 2]) {
        rotate([90, 0, 0]) {
            linear_extrude(height = handle_thickness, center = true) {
                difference() {
                    // Outer D-shape
                    union() {
                        // Rectangular part connecting to mug
                        translate([0, handle_outer_height / 2])
                            square([handle_thickness + 2, handle_outer_height], center = true);
                        
                        // Semi-circular outer part
                        translate([handle_thickness / 2, handle_outer_height / 2])
                            resize([handle_outer_width * 2, handle_outer_height])
                                circle(d = handle_outer_height, $fn = 60);
                    }
                    
                    // Inner cutout (D-shape hole)
                    translate([handle_thickness / 2, handle_outer_height / 2])
                        resize([handle_inner_width * 2, handle_inner_height])
                            circle(d = handle_inner_height, $fn = 60);
                    
                    // Cut off the left side to make D-shape
                    translate([-handle_outer_width - 5, 0])
                        square([handle_outer_width + 5, handle_outer_height + 10]);
                }
            }
        }
    }
}

// Final mug assembly
union() {
    mug_body();
    handle();
}
パラメータ (8)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare_claude-opus-4-5-d97d52b03153-2026-04-28T10-10-40-659Z
matrixIdbare/claude-opus-4-5
signatured97d52b031531068…
provideranthropic
modelclaude-opus-4-5-20251101
harnessbare
statussuccess
duration11.37s (wallclock: load + prompt eval + generation + network)
tokens330 in / 709 out
wallclock tok/s62.3 tok/s (end-to-end)
cost$0.0194
createdAt2026-04-28T10:10:40.659Z
gitCommit266a4b423d4e
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。