vibe-openscad

bare-low/o3 / tier-2-offset-handle-mug

success tier 2

bare (o3)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 51.3s · 273/3192t · $0.0261
SCAD (67 lines)
// Parameters
$fn = 128;

//------------------
// Mug body
//------------------
module mug_body() {
    outer_radius = 40;        // 80 mm outer diameter
    inner_radius = 35;        // 70 mm inner diameter
    height       = 90;
    bottom_thk   = 6;
    
    difference() {
        // Outer shell
        cylinder(h = height, r = outer_radius);
        
        // Inner cavity (raised by bottom thickness)
        translate([0, 0, bottom_thk])
            cylinder(h = height - bottom_thk, r = inner_radius);
    }
}

//------------------
// Handle
//------------------
module handle() {
    inner_h   = 30;   // inner vertical clearance
    inner_w   = 25;   // inner horizontal clearance
    wall_thk  = 5;    // handle wall thickness
    depth     = 10;   // thickness (depth) of handle along Y
    
    // 2-D inner void of the handle (D-shape) in the X–Z plane
    module inner_shape() {
        union() {
            // Rectangle part
            translate([0, -inner_h/2])
                square([inner_w, inner_h], center = false);
            // Semicircular end
            translate([inner_w, 0])
                circle(r = inner_h/2);
        }
    }
    
    // 2-D outer profile (offset of inner shape)
    module outer_shape() {
        offset(delta = wall_thk) inner_shape();
    }
    
    // Build 3-D handle by extruding the 2-D profiles along Y
    translate([40, 0, 45])  // attach to +X side, centered vertically
    difference() {
        // Solid outer shell
        linear_extrude(height = depth, center = true)
            outer_shape();
        // Hollow out the finger space
        linear_extrude(height = depth, center = true)
            inner_shape();
    }
}

//------------------
// Assembly
//------------------
union() {
    mug_body();
    handle();
}

meta

runIdbare-low_o3-033c2ce07303-2026-04-28T18-52-07-534Z
matrixIdbare-low/o3
signature033c2ce07303d3f6…
provideropenai
modelo3-2025-04-16
harnessbare
statussuccess
duration51.31s (wallclock: load + prompt eval + generation + network)
tokens273 in / 3192 out
wallclock tok/s62.2 tok/s (end-to-end)
cost$0.0261
createdAt2026-04-28T18:52:07.534Z
gitCommit781e6c683dda
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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