vibe-openscad

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

success tier 2

bare (claude opus 4.8)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 12.8s · 343/974t · $0.0261
SCAD (73 lines)
// マグカップ(取手は +X 方向のみ)

$fn = 100;

// ===== パラメータ =====
outer_d   = 80;   // 外径
inner_d   = 70;   // 内径
height    = 90;   // 全体高さ
bottom_th = 6;    // 底厚

outer_r = outer_d / 2;
inner_r = inner_d / 2;

// 取手パラメータ
handle_hole_h = 30;   // 内側空間の高さ
handle_hole_w = 25;   // 内側空間の幅
handle_th     = 8;    // 取手の太さ(断面)
handle_z      = height / 2;  // 取手の高さ中心

// ===== 本体 =====
module body() {
    difference() {
        cylinder(h = height, r = outer_r);
        // 内側中空
        translate([0, 0, bottom_th])
            cylinder(h = height - bottom_th + 1, r = inner_r);
    }
}

// ===== 取手(D字形状)=====
module handle() {
    // 外側半径と内側半径
    inner_handle_r = handle_hole_h / 2;          // D字の内側半円半径(高さ方向)
    outer_handle_r = inner_handle_r + handle_th; // 外側半径

    // 取手を rotate_extrude で D 字状リングとして作り、
    // 半分(外側半円側)だけを使う方式ではなく、
    // ここでは平面 D 字形を押し出して構成する。

    translate([0, 0, handle_z])
    rotate([90, 0, 0])   // XZ平面の形を Y 方向に厚みを持たせる
    linear_extrude(height = handle_th, center = true)
        difference() {
            // 外形 D 字(外側半円 + 本体側直線)
            hull() {
                // 本体側の上下端(直線部)
                translate([0, -handle_hole_h/2 - handle_th/2])
                    square([handle_th, handle_th], center = true);
                translate([0,  handle_hole_h/2 + handle_th/2])
                    square([handle_th, handle_th], center = true);
                // 外側半円
                translate([handle_hole_w, 0])
                    circle(r = outer_handle_r);
            }
            // 内側の穴
            hull() {
                translate([0, -handle_hole_h/2])
                    square([0.1, handle_th], center = true);
                translate([0,  handle_hole_h/2])
                    square([0.1, handle_th], center = true);
                translate([handle_hole_w, 0])
                    circle(r = inner_handle_r);
            }
        }
}

// ===== 組み立て =====
union() {
    body();
    // 取手を本体外周に接続(少し本体側へめり込ませて確実に union)
    translate([outer_r - 2, 0, 0])
        handle();
}
パラメータ (7)
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-low_claude-opus-4-8-09f9aeba6a46-2026-06-09T17-38-24-710Z
matrixIdbare-low/claude-opus-4-8
signature09f9aeba6a461736…
provideranthropic
modelclaude-opus-4-8
harnessbare
statussuccess
duration12.81s (wallclock: load + prompt eval + generation + network)
tokens343 in / 974 out
wallclock tok/s76.1 tok/s (end-to-end)
cost$0.0261
createdAt2026-06-09T17:38:24.710Z
gitCommitc8a77106d384
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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