vibe-openscad

bare-xhigh/gpt-5.6-sol / tier-2-offset-handle-mug

success tier 2

bare (gpt 5.6 sol)

render
bare render of tier-2-offset-handle-mug
loading STL…
success 36.6s · 273/2687t · $0.0820
SCAD (82 lines)
$fn = 128;

// Mug dimensions
outer_radius = 40;
inner_radius = 35;
mug_height   = 90;
bottom_thickness = 6;

// Handle dimensions
handle_center_z = mug_height / 2;
opening_height  = 30;
opening_width   = 25;
handle_wall     = 6;
handle_depth    = 12;

// Opening begins just outside the mug body
opening_left_x = outer_radius + 1;

// D-shaped 2D profile:
// left side is straight, right side is semicircular.
module d_profile(left_x, center_z, profile_height, profile_width) {
    r = profile_height / 2;
    arc_center_x = left_x + profile_width - r;

    union() {
        translate([left_x, center_z - r])
            square([arc_center_x - left_x, profile_height]);

        intersection() {
            translate([arc_center_x, center_z])
                circle(r = r, $fn = 128);

            translate([arc_center_x, center_z - r - 1])
                square([r + 1, profile_height + 2]);
        }
    }
}

module mug_body() {
    difference() {
        cylinder(h = mug_height, r = outer_radius);

        translate([0, 0, bottom_thickness])
            cylinder(
                h = mug_height - bottom_thickness + 1,
                r = inner_radius
            );
    }
}

module mug_handle() {
    outer_left_x = opening_left_x - handle_wall;
    outer_height = opening_height + 2 * handle_wall;
    outer_width  = opening_width + 2 * handle_wall;

    rotate([90, 0, 0])
        linear_extrude(
            height = handle_depth,
            center = true,
            convexity = 10
        )
        difference() {
            d_profile(
                outer_left_x,
                handle_center_z,
                outer_height,
                outer_width
            );

            d_profile(
                opening_left_x,
                handle_center_z,
                opening_height,
                opening_width
            );
        }
}

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

meta

runIdbare-xhigh_gpt-5.6-sol-f6d6fe1d7b6d-2026-09-05T10-41-05-992Z
matrixIdbare-xhigh/gpt-5.6-sol
signaturef6d6fe1d7b6d425e…
provideropenai
modelgpt-5.6-sol
harnessbare
statussuccess
duration36.56s (wallclock: load + prompt eval + generation + network)
tokens273 in / 2687 out
wallclock tok/s73.5 tok/s (end-to-end)
cost$0.0820
createdAt2026-09-05T10:41:05.992Z
gitCommit6126da97a014
openscadOpenSCAD version 2026.04.27

prompt

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

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

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

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