vibe-openscad

iter-png-3/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.7s · 1922/948t · $0.0333
SCAD (83 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 = 12;

// 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 creates a D-shape attached to +X side of mug
    // Inner space: 30mm height x 25mm width
    
    handle_tube_r = handle_thickness / 2;
    
    // Vertical positions for top and bottom of handle inner space
    top_z = handle_center_z + handle_inner_height / 2;
    bottom_z = handle_center_z - handle_inner_height / 2;
    
    // Horizontal extension from mug surface
    extend_x = handle_inner_width;
    
    hull() {
        // Top connection point - embedded in mug wall
        translate([outer_radius - handle_tube_r, 0, top_z])
            sphere(r = handle_tube_r, $fn = 40);
        // Top outer point
        translate([outer_radius + extend_x, 0, top_z])
            sphere(r = handle_tube_r, $fn = 40);
    }
    
    hull() {
        // Bottom connection point - embedded in mug wall
        translate([outer_radius - handle_tube_r, 0, bottom_z])
            sphere(r = handle_tube_r, $fn = 40);
        // Bottom outer point
        translate([outer_radius + extend_x, 0, bottom_z])
            sphere(r = handle_tube_r, $fn = 40);
    }
    
    // Outer vertical curved section (semicircle in XZ plane)
    translate([outer_radius + extend_x, 0, handle_center_z])
        rotate([90, 0, 0])
            rotate_extrude(angle = 180, convexity = 10, $fn = 60)
                translate([handle_inner_height / 2, 0, 0])
                    circle(r = handle_tube_r, $fn = 40);
    
    // Connection reinforcement blocks to ensure solid union with mug body
    // Top connection block
    translate([outer_radius - wall_thickness, -handle_tube_r, top_z - handle_tube_r])
        cube([wall_thickness + 2, handle_tube_r * 2, handle_tube_r * 2]);
    
    // Bottom connection block
    translate([outer_radius - wall_thickness, -handle_tube_r, bottom_z - handle_tube_r])
        cube([wall_thickness + 2, handle_tube_r * 2, handle_tube_r * 2]);
}

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

meta

runIditer-png-3_claude-opus-4-5-c5619ea28cec-2026-04-28T18-57-55-099Z
matrixIditer-png-3/claude-opus-4-5
signaturec5619ea28cece22c…
provideranthropic
modelclaude-opus-4-5-20251101
harnessbare
statussuccess
duration11.73s (wallclock: load + prompt eval + generation + network)
tokens1922 in / 948 out
wallclock tok/s80.8 tok/s (end-to-end)
cost$0.0333
createdAt2026-04-28T18:57:55.099Z
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 ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。