vibe-openscad

tier-1-mug / gpt-6.1-sol

6 run / 累計 209.6s / 累計 $0.0922

openai gpt 6.1 sol bare

bare (provider default effort)

run detail →
render
bare render of tier-1-mug
loading STL…
success 16.7s · 168/617t · $0.0065
SCAD (48 lines)
$fn = 128;

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

handle_outer_radius = 12;
handle_ring_thickness = 4;
handle_depth = 8;

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_inner_radius + 1;
handle_center_z = cup_height / 2;

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, handle_center_z])
        rotate([90, 0, 0])
            difference() {
                cylinder(
                    h = handle_depth,
                    r = handle_outer_radius,
                    center = true
                );

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

prompt

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

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

variant: effort

low success →
low
16.4s · 168/590t · $0.0062
SCAD (48 lines)
$fn = 128;

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

handle_outer_radius = 12;
handle_inner_radius = 9;
handle_depth = 8;
handle_overlap = 3;

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

handle_center_x =
    outer_radius + handle_outer_radius - handle_overlap;
handle_center_z = cup_height / 2;

union() {
    // 上面を開口し、底面を6mm残したカップ本体
    difference() {
        cylinder(h = cup_height, r = outer_radius);

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

    // XZ平面に配置したリング状の取手
    translate([handle_center_x, 0, handle_center_z])
        rotate([90, 0, 0])
            difference() {
                cylinder(
                    h = handle_depth,
                    r = handle_outer_radius,
                    center = true
                );

                cylinder(
                    h = handle_depth + 2,
                    r = handle_inner_radius,
                    center = true
                );
            }
}
medium (default) success →
medium
16.7s · 168/617t · $0.0065
SCAD (48 lines)
$fn = 128;

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

handle_outer_radius = 12;
handle_ring_thickness = 4;
handle_depth = 8;

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_inner_radius + 1;
handle_center_z = cup_height / 2;

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, handle_center_z])
        rotate([90, 0, 0])
            difference() {
                cylinder(
                    h = handle_depth,
                    r = handle_outer_radius,
                    center = true
                );

                cylinder(
                    h = handle_depth + 2 * epsilon,
                    r = handle_inner_radius,
                    center = true
                );
            }
}
high success →
high
29.6s · 168/1225t · $0.0126
SCAD (38 lines)
$fn = 128;

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

handle_radius = 12;
handle_tube_radius = 3;

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

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

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

    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);
}
max success →
max
66.9s · 168/3205t · $0.0324
SCAD (46 lines)
$fn = 128;

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;

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

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

        translate([
            cup_outer_radius + handle_outer_radius - handle_overlap,
            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_outer_radius - handle_ring_thickness,
                        center = true
                    );
                }
    }

    translate([0, 0, bottom_thickness])
        cylinder(
            h = cup_height - bottom_thickness + epsilon,
            r = cup_inner_radius
        );
}
xhigh success →
xhigh
63.3s · 168/2766t · $0.0280
SCAD (37 lines)
$fn = 160;

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

handle_outer_radius = 12;
handle_tube_radius = 1.5;
handle_overlap = 2;

outer_radius = outer_diameter / 2;
inner_radius = outer_radius - wall_thickness;
handle_major_radius = handle_outer_radius - handle_tube_radius;
handle_center_x = outer_radius + handle_outer_radius - handle_overlap;

epsilon = 0.02;

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

        // 外半径12mm、指を通す穴の直径18mmのリング状取手
        translate([handle_center_x, 0, cup_height / 2])
            rotate([90, 0, 0])
                rotate_extrude(convexity = 10)
                    translate([handle_major_radius, 0, 0])
                        circle(r = handle_tube_radius);
    }

    // 底厚6mmを残し、上面まで内側をくり抜く
    translate([0, 0, bottom_thickness])
        cylinder(
            r = inner_radius,
            h = cup_height - bottom_thickness + epsilon
        );
}