vibe-openscad

tier-1-mug / claude-sonnet-5

7 run / 累計 1886.4s / 累計 $1.78

claude sonnet 5 bare

bare (provider default effort)

run detail →
render
bare render of tier-1-mug
loading STL…
success 289.5s · 220/25862t · $0.2591
SCAD (41 lines)
// ==== パラメータ ====
outer_r  = 40;              // カップ外径半径 (外径80mm)
wall_t   = 4;                // 側面の肉厚
inner_r  = outer_r - wall_t; // カップ内径半径
cup_h    = 100;               // カップの高さ
bottom_t = 6;                 // 底面の厚み

handle_tube_r   = 12;                       // 取手(リング)断面の半径
handle_main_r   = 28;                       // 取手リングの主半径(中心から管中心までの距離)
handle_embed    = 6;                        // 取手をカップ側面に埋め込む深さ
handle_center_x = outer_r - handle_embed;   // 取手中心のX座標
handle_center_z = cup_h / 2;                // 取手中心の高さ(カップ中心高さ)

$fn = 100; // 曲面の分割数

// 取手(リング状、断面半径 handle_tube_r のトーラス)
module handle() {
    translate([handle_center_x, 0, handle_center_z])
        rotate([90, 0, 0])
            rotate_extrude()
                translate([handle_main_r, 0])
                    circle(r = handle_tube_r);
}

// マグカップ本体
module mug() {
    difference() {
        union() {
            // 中身の詰まった外形の円柱
            cylinder(r = outer_r, h = cup_h);
            // 取手を側面に接続
            handle();
        }
        // 内部をくり抜いて飲み物を入れられる形状にする
        // (底面厚み bottom_t を残し、上端は開口させる)
        translate([0, 0, bottom_t])
            cylinder(r = inner_r, h = cup_h - bottom_t + 1);
    }
}

mug();
パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング

prompt

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

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

variant: effort

low success →
low
4.6s · 220/387t · $0.0043
SCAD (40 lines)
$fn = 100;

outer_d = 80;
outer_r = outer_d / 2;
height = 100;
wall = 4;
bottom = 6;

inner_r = outer_r - wall;
inner_height = height - bottom;

handle_r = 12; // 取手のリング半径(取っ手の輪の半径)
handle_tube_r = 4; // 取手の管の太さ
handle_center_height = height / 2;

module cup_body() {
    difference() {
        cylinder(h = height, r = outer_r);
        translate([0, 0, bottom])
            cylinder(h = inner_height + 1, r = inner_r);
    }
}

module handle() {
    // 取手をカップ外周に接するように配置
    translate([outer_r + handle_r - 2, 0, handle_center_height])
        rotate([90, 0, 0])
            torus(handle_r, handle_tube_r);
}

module torus(r, tube_r) {
    rotate_extrude(convexity = 10)
        translate([r, 0, 0])
            circle(r = tube_r);
}

union() {
    cup_body();
    handle();
}
mediumnot run
—
high (default) success →
high
5.1s · 220/474t · $0.0052
SCAD (42 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_tube_radius = 12; // 取手の管の半径(太さ)
handle_ring_radius = 28; // 取手のリング自体の半径(大きさ)
handle_center_height = height / 2;

module mug_body() {
    difference() {
        // 外側の円柱
        cylinder(r=outer_radius, h=height, $fn=100);
        
        // 内側をくり抜く(底面の厚みを残す)
        translate([0, 0, bottom_thickness])
            cylinder(r=inner_radius, h=inner_height + 1, $fn=100);
    }
}

module handle() {
    translate([outer_radius + handle_ring_radius - handle_tube_radius, 0, handle_center_height])
        rotate([90, 0, 0])
            rotate_extrude($fn=100)
                translate([handle_ring_radius, 0, 0])
                    circle(r=handle_tube_radius, $fn=50);
}

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

mug();
max no_code nocode →
no_code
654.5s · 220/64000t · $0.6404
model returned empty response (stopReason=max_tokens)
SCAD (1 lines)

no SCAD

xhigh success →
xhigh
273.1s · 220/22615t · $0.2266
SCAD (54 lines)
// ==========================
// マグカップ パラメータ設定
// ==========================
cup_outer_r   = 40;   // カップの外径半径(外径80mm)
cup_wall_t    = 4;    // 側面の肉厚
cup_height    = 100;  // カップの高さ
cup_bottom_t  = 6;    // 底面の厚み
cup_inner_r   = cup_outer_r - cup_wall_t; // 内径半径(36mm)

handle_tube_r   = 12;                 // 取手の断面半径(要件通り12mm)
handle_main_r   = 25;                 // 取手リングの主半径(大きさ)
handle_embed    = 8;                  // カップ側面への埋め込み量
handle_center_z = cup_height / 2;     // 取手の中心高さ(カップ中央=50mm)

$fn = 100; // 全体の滑らかさ

// ==========================
// カップ本体(内側をくり抜いた円柱)
// ==========================
module cup_body() {
    difference() {
        cylinder(r = cup_outer_r, h = cup_height);

        // 内側の空洞(底面厚み分は残し、上端を超えて貫通させる)
        translate([0, 0, cup_bottom_t])
            cylinder(r = cup_inner_r, h = cup_height);
    }
}

// ==========================
// 取手(半円状のリング/トーラスの半分)
// ==========================
module handle() {
    // 断面円(半径12mm)をZ軸周りに180度回転してリングの半分を作成し、
    // Y軸周りに90度回転することでカップの高さ方向(Z軸)に沿った
    // 縦長のリング形状にする。
    rotate([0, 90, 0])
        rotate_extrude(angle = 180, convexity = 10)
            translate([handle_main_r, 0])
                circle(r = handle_tube_r);
}

// ==========================
// 全体組み立て
// ==========================
union() {
    cup_body();

    // 取手をカップ側面に配置
    // Y方向:外径からやや埋め込んでしっかり接続
    // Z方向:カップの中心高さに配置
    translate([0, cup_outer_r - handle_embed, handle_center_z])
        handle();
}

variant: thinking

off success →
off
5.1s · 220/474t · $0.0052
SCAD (42 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_tube_radius = 12; // 取手の管の半径(太さ)
handle_ring_radius = 28; // 取手のリング自体の半径(大きさ)
handle_center_height = height / 2;

module mug_body() {
    difference() {
        // 外側の円柱
        cylinder(r=outer_radius, h=height, $fn=100);
        
        // 内側をくり抜く(底面の厚みを残す)
        translate([0, 0, bottom_thickness])
            cylinder(r=inner_radius, h=inner_height + 1, $fn=100);
    }
}

module handle() {
    translate([outer_radius + handle_ring_radius - handle_tube_radius, 0, handle_center_height])
        rotate([90, 0, 0])
            rotate_extrude($fn=100)
                translate([handle_ring_radius, 0, 0])
                    circle(r=handle_tube_radius, $fn=50);
}

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

mug();
adaptive (default) no_code nocode →
no_code
654.5s · 220/64000t · $0.6404
model returned empty response (stopReason=max_tokens)
SCAD (1 lines)

no SCAD

dynamicnot run
—