vibe-openscad

bare-low/claude-opus-4-7 / tier-2-offset-handle-mug

success tier 2

bare (claude opus 4.7)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 11.0s · 348/789t · $0.0215
SCAD (72 lines)
$fn = 100;

outer_d = 80;
inner_d = 70;
height = 90;
bottom_thk = 6;

handle_inner_h = 30;
handle_inner_w = 25;
handle_thk = 6;

module body() {
    difference() {
        cylinder(d = outer_d, h = height);
        translate([0, 0, bottom_thk])
            cylinder(d = inner_d, h = height);
    }
}

module handle() {
    // D-shape handle on +X side, centered vertically
    outer_h = handle_inner_h + 2 * handle_thk;
    outer_w = handle_inner_w + handle_thk; // straight side at body, semicircle outside
    
    cz = height / 2;
    // Place so straight side is at x = body surface (slightly inside for union)
    x0 = outer_d/2 - 2; // overlap into body for manifold union
    
    translate([x0, 0, cz])
        difference() {
            // outer D: rectangle + semicircle on +x side
            hull() {
                translate([0, -outer_h/2 + outer_h/2, -outer_h/2])
                    cube([0.01, outer_h, outer_h], center = false)
                    ;
            }
            // simpler approach below
        }
}

// Simpler handle implementation
module d_handle() {
    outer_h = handle_inner_h + 2 * handle_thk;
    cz = height / 2;
    x0 = outer_d/2 - 2;
    
    translate([x0, 0, cz - outer_h/2])
    difference() {
        // outer D shape (extruded)
        linear_extrude(height = outer_h)
            hull() {
                translate([0, -outer_h/2, 0])
                    square([0.1, outer_h]);
                translate([handle_inner_w + handle_thk, 0, 0])
                    circle(d = outer_h);
            }
        // inner hole
        translate([0, 0, handle_thk])
            linear_extrude(height = handle_inner_h)
                hull() {
                    translate([0, -handle_inner_h/2, 0])
                        square([0.1, handle_inner_h]);
                    translate([handle_inner_w, 0, 0])
                        circle(d = handle_inner_h);
                }
    }
}

union() {
    body();
    d_handle();
}
パラメータ (7)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-low_claude-opus-4-7-e67ec8087ba7-2026-04-28T18-47-32-252Z
matrixIdbare-low/claude-opus-4-7
signaturee67ec8087ba7ee84…
provideranthropic
modelclaude-opus-4-7
harnessbare
statussuccess
duration11.02s (wallclock: load + prompt eval + generation + network)
tokens348 in / 789 out
wallclock tok/s71.6 tok/s (end-to-end)
cost$0.0215
createdAt2026-04-28T18:47:32.252Z
gitCommit781e6c683dda
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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