vibe-openscad

tier-1-mug / gpt-6-astra

6 run / 累計 179.5s / 累計 $0.4622

openai gpt 6 astra bare

bare (provider default effort)

run detail →
render
bare render of tier-1-mug
loading STL…
success 19.9s · 168/790t · $0.0412
SCAD (48 lines)
$fn = 160;

cup_outer_diameter = 80;
cup_height = 100;
wall_thickness = 4;
bottom_thickness = 6;

handle_outer_radius = 12;
handle_ring_thickness = 3;
handle_width = 6;
handle_overlap = 2.5;

cup_outer_radius = cup_outer_diameter / 2;
cup_inner_radius = cup_outer_radius - wall_thickness;
handle_inner_radius = handle_outer_radius - handle_ring_thickness;
handle_center_x = cup_outer_radius
                + handle_outer_radius
                - handle_overlap;

epsilon = 0.1;

union() {
    difference() {
        cylinder(h = cup_height, r = cup_outer_radius);

        translate([0, 0, bottom_thickness])
            cylinder(
                h = cup_height - bottom_thickness + epsilon,
                r = cup_inner_radius
            );
    }

    translate([handle_center_x, 0, cup_height / 2])
        rotate([90, 0, 0])
            difference() {
                cylinder(
                    h = handle_width,
                    r = handle_outer_radius,
                    center = true
                );

                cylinder(
                    h = handle_width + 2 * epsilon,
                    r = handle_inner_radius,
                    center = true
                );
            }
}
パラメータ (9) —
スライダを動かすと openscad-wasm で再レンダリング

prompt

OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。
底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。
さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。
取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。

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

variant: effort

low success →
low
9.0s · 168/465t · $0.0249
SCAD (35 lines)
$fn = 128;

// 寸法(mm)
outer_diameter = 80;
cup_height = 100;
wall_thickness = 4;
bottom_thickness = 6;

handle_radius = 12;       // リング中心線の半径
handle_tube_radius = 4;   // 取手の断面半径
handle_center_x = outer_diameter / 2 + 10;
handle_center_z = cup_height / 2;

epsilon = 0.1;

difference() {
    union() {
        // カップ本体
        cylinder(d = outer_diameter, h = cup_height);

        // 側面に接続するリング状の取手(XZ平面)
        translate([handle_center_x, 0, handle_center_z])
            rotate([90, 0, 0])
                rotate_extrude()
                    translate([handle_radius, 0, 0])
                        circle(r = handle_tube_radius);
    }

    // 上面を開口し、底厚6mm・側壁厚4mmを確保
    translate([0, 0, bottom_thickness])
        cylinder(
            d = outer_diameter - 2 * wall_thickness,
            h = cup_height - bottom_thickness + epsilon
        );
}
medium (default) success →
medium
19.9s · 168/790t · $0.0412
SCAD (48 lines)
$fn = 160;

cup_outer_diameter = 80;
cup_height = 100;
wall_thickness = 4;
bottom_thickness = 6;

handle_outer_radius = 12;
handle_ring_thickness = 3;
handle_width = 6;
handle_overlap = 2.5;

cup_outer_radius = cup_outer_diameter / 2;
cup_inner_radius = cup_outer_radius - wall_thickness;
handle_inner_radius = handle_outer_radius - handle_ring_thickness;
handle_center_x = cup_outer_radius
                + handle_outer_radius
                - handle_overlap;

epsilon = 0.1;

union() {
    difference() {
        cylinder(h = cup_height, r = cup_outer_radius);

        translate([0, 0, bottom_thickness])
            cylinder(
                h = cup_height - bottom_thickness + epsilon,
                r = cup_inner_radius
            );
    }

    translate([handle_center_x, 0, cup_height / 2])
        rotate([90, 0, 0])
            difference() {
                cylinder(
                    h = handle_width,
                    r = handle_outer_radius,
                    center = true
                );

                cylinder(
                    h = handle_width + 2 * epsilon,
                    r = handle_inner_radius,
                    center = true
                );
            }
}
high success →
high
21.8s · 168/1119t · $0.0576
SCAD (36 lines)
$fn = 128;

outer_diameter = 80;
cup_height = 100;
wall_thickness = 4;
bottom_thickness = 6;

handle_radius = 12;
handle_tube_radius = wall_thickness / 2;

outer_radius = outer_diameter / 2;
inner_radius = outer_radius - wall_thickness;
handle_center_x = outer_radius + handle_radius - handle_tube_radius;

epsilon = 0.01;

difference() {
    union() {
        // カップ本体
        cylinder(h = cup_height, r = outer_radius);

        // 側面から外向きに張り出す、縦向きのリング状取手
        translate([handle_center_x, 0, cup_height / 2])
            rotate([90, 0, 0])
                rotate_extrude(convexity = 10)
                    translate([handle_radius, 0, 0])
                        circle(r = handle_tube_radius);
    }

    // 底厚6mmを残し、上面まで内側をくり抜く
    translate([0, 0, bottom_thickness])
        cylinder(
            h = cup_height - bottom_thickness + epsilon,
            r = inner_radius
        );
}
max success →
max
65.6s · 168/3597t · $0.1815
SCAD (33 lines)
$fn = 128;

outer_diameter = 80;
cup_height = 100;
wall_thickness = 4;
bottom_thickness = 6;

handle_radius = 12;       // リングの中心線半径
handle_tube_radius = 2;   // 断面半径:指穴の直径は20mm

outer_radius = outer_diameter / 2;
inner_radius = outer_radius - wall_thickness;
epsilon = 0.01;

difference() {
    union() {
        cylinder(r = outer_radius, h = cup_height);

        // カップ側面へ2mm食い込ませて接合し、指穴を外周より外に配置
        translate([outer_radius + handle_radius, 0, cup_height / 2])
            rotate([90, 0, 0])
                rotate_extrude(convexity = 10)
                    translate([handle_radius, 0, 0])
                        circle(r = handle_tube_radius);
    }

    // 底を6mm残し、上端まで内側をくり抜く
    translate([0, 0, bottom_thickness])
        cylinder(
            r = inner_radius,
            h = cup_height - bottom_thickness + epsilon
        );
}
xhigh success →
xhigh
43.2s · 168/2281t · $0.1157
SCAD (52 lines)
$fn = 160;

// 寸法(mm)
cup_outer_diameter = 80;
cup_height = 100;
wall_thickness = 4;
bottom_thickness = 6;

// 取手:外半径12mm、指穴直径20mm
handle_outer_radius = 12;
handle_inner_radius = 10;
handle_depth = 6;
handle_overlap = 1.5;

epsilon = 0.01;
cup_outer_radius = cup_outer_diameter / 2;
cup_inner_radius = cup_outer_radius - wall_thickness;

union() {
    // カップ本体:底を6mm残し、上面までくり抜く
    difference() {
        cylinder(r = cup_outer_radius, h = cup_height);

        translate([0, 0, bottom_thickness])
            cylinder(
                r = cup_inner_radius,
                h = cup_height - bottom_thickness + epsilon
            );
    }

    // XZ平面上のリング状取手
    // 本体と重ねて接合し、指穴はカップ外周の外側に配置
    translate([
        cup_outer_radius + handle_outer_radius - handle_overlap,
        0,
        cup_height / 2
    ])
        rotate([90, 0, 0])
            difference() {
                cylinder(
                    r = handle_outer_radius,
                    h = handle_depth,
                    center = true
                );

                cylinder(
                    r = handle_inner_radius,
                    h = handle_depth + 2 * epsilon,
                    center = true
                );
            }
}