vibe-openscad

bare-low/claude-fable-5-1 / tier-2-offset-handle-mug

success tier 2

bare (claude fable 5.1)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 13.4s · 345/717t · $0.0393
SCAD (58 lines)
// マグカップ(取手は +X 方向)
$fn = 96;

outer_d   = 80;    // 外径
inner_d   = 70;    // 内径
height    = 90;    // 全高
bottom_t  = 6;     // 底の厚み

// 取手パラメータ
handle_gap_h = 30; // 取手内側の高さ
handle_gap_w = 25; // 取手内側の幅(本体表面から)
handle_t     = 8;  // 取手の太さ(断面の幅)
handle_depth = 12; // 取手の厚み(Y方向)
handle_z     = height / 2; // 取手中心の高さ

outer_r = outer_d / 2;

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

// 取手の D 字プロファイル(XZ 平面、X: 本体外側方向)
// 本体側は直線、外側は半円
module handle_profile_2d(w, h) {
    // w: 直線部から半円の最外点までの幅, h: 直線部の高さ
    // 半円は直線部の端に接続
    hull() {
        square([0.01, h], center = true);
        translate([w - h / 2, 0]) circle(d = h);
    }
}

module handle() {
    inner_h = handle_gap_h;
    inner_w = handle_gap_w;
    outer_h = inner_h + 2 * handle_t;
    outer_w = inner_w + handle_t;

    // 本体内部に少し食い込ませて確実に union する
    overlap = 3;
    translate([outer_r - overlap, 0, handle_z])
        rotate([90, 0, 0])
            linear_extrude(height = handle_depth, center = true)
                difference() {
                    handle_profile_2d(outer_w + overlap, outer_h);
                    translate([overlap, 0]) handle_profile_2d(inner_w, inner_h);
                }
}

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

meta

runIdbare-low_claude-fable-5-1-048850869f35-2026-09-05T12-27-21-633Z
matrixIdbare-low/claude-fable-5-1
signature048850869f3523cb…
provideranthropic
modelclaude-fable-5-1
harnessbare
statussuccess
duration13.35s (wallclock: load + prompt eval + generation + network)
tokens345 in / 717 out
wallclock tok/s53.7 tok/s (end-to-end)
cost$0.0393
createdAt2026-09-05T12:27:21.633Z
gitCommit69ade4654888
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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