vibe-openscad

tier-2-offset-handle-mug / gpt-5.6-luna

6 run / 累計 382.5s / 累計 $0.0418

openai gpt 5.6 luna bare

bare (provider default effort)

run detail →
render
bare render of tier-2-offset-handle-mug
loading STL…
success 39.4s · 273/2676t · $0.0033
SCAD (59 lines)
$fn = 128;

outer_diameter = 80;
inner_diameter = 70;
height = 90;
bottom_thickness = 6;

outer_radius = outer_diameter / 2;
inner_radius = inner_diameter / 2;

handle_thickness = 10;

// マグ本体
module mug_body() {
    difference() {
        cylinder(
            r = outer_radius,
            h = height
        );

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

// +X方向にのみ配置するD字型取手
module handle() {
    rotate([90, 0, 0])
        linear_extrude(
            height = handle_thickness,
            center = true
        ) {
            difference() {
                polygon([
                    [35, 20],
                    [50, 20],
                    for (a = [-90 : 10 : 90])
                        [50 + 25 * cos(a), 45 + 25 * sin(a)],
                    [35, 70]
                ]);

                // 内側空間:幅25mm × 高さ30mm
                polygon([
                    [40, 30],
                    [65, 30],
                    [65, 60],
                    [40, 60]
                ]);
            }
        }
}

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

prompt

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

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

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

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

variant: effort

low success →
low
18.9s · 273/1707t · $0.0021
SCAD (42 lines)
$fn = 128;

outer_diameter = 80;
inner_diameter = 70;
height = 90;
bottom_thickness = 6;

module mug_body() {
    difference() {
        cylinder(
            d = outer_diameter,
            h = height
        );

        translate([0, 0, bottom_thickness])
            cylinder(
                d = inner_diameter,
                h = height - bottom_thickness + 1
            );
    }
}

module d_handle() {
    difference() {
        linear_extrude(height = 10, center = true)
            union() {
                translate([35, 20])
                    square([25, 50]);

                translate([60, 45])
                    circle(r = 25);
            }

        translate([40, -11, 30])
            cube([25, 22, 30]);
    }
}

union() {
    mug_body();
    d_handle();
}
medium (default) success →
medium
39.4s · 273/2676t · $0.0033
SCAD (59 lines)
$fn = 128;

outer_diameter = 80;
inner_diameter = 70;
height = 90;
bottom_thickness = 6;

outer_radius = outer_diameter / 2;
inner_radius = inner_diameter / 2;

handle_thickness = 10;

// マグ本体
module mug_body() {
    difference() {
        cylinder(
            r = outer_radius,
            h = height
        );

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

// +X方向にのみ配置するD字型取手
module handle() {
    rotate([90, 0, 0])
        linear_extrude(
            height = handle_thickness,
            center = true
        ) {
            difference() {
                polygon([
                    [35, 20],
                    [50, 20],
                    for (a = [-90 : 10 : 90])
                        [50 + 25 * cos(a), 45 + 25 * sin(a)],
                    [35, 70]
                ]);

                // 内側空間:幅25mm × 高さ30mm
                polygon([
                    [40, 30],
                    [65, 30],
                    [65, 60],
                    [40, 60]
                ]);
            }
        }
}

union() {
    mug_body();
    handle();
}
high success →
high
39.1s · 273/4119t · $0.0050
SCAD (37 lines)
$fn = 128;

module d_shape(x0, rect_width, radius) {
    union() {
        translate([x0, -radius])
            square([rect_width, 2 * radius]);

        translate([x0 + rect_width, 0])
            circle(r = radius);
    }
}

module handle_profile() {
    difference() {
        // 外形: 幅40mm、高さ40mmのD字形
        d_shape(35, 20, 20);

        // 内側空間: 幅25mm、高さ30mmのD字形
        d_shape(40, 10, 15);
    }
}

union() {
    // 本体: 外径80mm、内径70mm、高さ90mm、底厚6mm
    difference() {
        cylinder(r = 40, h = 90);

        translate([0, 0, 6])
            cylinder(r = 35, h = 90);
    }

    // 取手: +X方向のみ、中央高さに配置
    translate([0, 6, 45])
        rotate([90, 0, 0])
            linear_extrude(height = 12)
                handle_profile();
}
max success →
max
90.0s · 273/10760t · $0.0130
SCAD (76 lines)
$fn = 128;

outer_diameter = 80;
inner_diameter = 70;
mug_height = 90;
bottom_thickness = 6;

handle_center_z = mug_height / 2;
handle_outer_x = 36;
handle_outer_radius = 32;
handle_inner_x = 40;
handle_inner_width = 25;
handle_inner_height = 30;
handle_thickness = 14;
handle_segments = 128;

module mug_body() {
    difference() {
        cylinder(
            d = outer_diameter,
            h = mug_height
        );

        translate([0, 0, bottom_thickness])
            cylinder(
                d = inner_diameter,
                h = mug_height + 1
            );
    }
}

module handle_outer_profile() {
    polygon(points = [
        for (i = [0 : handle_segments])
            [
                handle_outer_x
                    + handle_outer_radius
                    * cos(90 - 180 * i / handle_segments),
                handle_center_z
                    + handle_outer_radius
                    * sin(90 - 180 * i / handle_segments)
            ]
    ]);
}

module handle_inner_profile() {
    polygon(points = [
        for (i = [0 : handle_segments])
            [
                handle_inner_x
                    + (handle_inner_width / 2)
                    * cos(90 - 180 * i / handle_segments),
                handle_center_z
                    + (handle_inner_height / 2)
                    * sin(90 - 180 * i / handle_segments)
            ]
    ]);
}

module handle() {
    rotate([90, 0, 0])
        linear_extrude(
            height = handle_thickness,
            center = true,
            convexity = 10
        )
            difference() {
                handle_outer_profile();
                handle_inner_profile();
            }
}

union() {
    mug_body();
    handle();
}
xhigh success →
xhigh
155.6s · 273/12640t · $0.0152
SCAD (32 lines)
$fn = 128;

module mug_body() {
    difference() {
        cylinder(h = 90, r = 40);
        translate([0, 0, 6])
            cylinder(h = 90, r = 35);
    }
}

module handle() {
    rotate([90, 0, 0])
        linear_extrude(height = 10, center = true, convexity = 10)
            difference() {
                polygon(points = concat(
                    [[35, 25]],
                    [for (a = [-90:2:90])
                        [50 + 20 * cos(a), 45 + 20 * sin(a)]],
                    [[35, 65]]
                ));

                polygon(points = [
                    for (a = [-90:2:90])
                        [40 + 25 * cos(a), 45 + 15 * sin(a)]
                ]);
            }
}

union() {
    mug_body();
    handle();
}