bare/claude-opus-5 / tier-1-mug
success tier 1
bare (claude opus 5)
render
// ===============================================
// マグカップ (外径80mm / 高さ100mm / 肉厚4mm)
// ===============================================
$fn = 120;
// --- パラメータ ---
outer_d = 80; // 外径
height = 100; // 全高
wall = 4; // 側面の肉厚
bottom_th = 6; // 底面の厚み
handle_r = 12; // 取手リングの中心半径
handle_thick = 8; // 取手の太さ(断面の直径)
handle_z = height / 2; // 取手の取り付け高さ(中心付近)
handle_offset = 4; // 取手リング中心をカップ外周からどれだけ外に出すか
outer_r = outer_d / 2;
inner_r = outer_r - wall;
// --- カップ本体 ---
module cup_body() {
difference() {
cylinder(h = height, r = outer_r);
translate([0, 0, bottom_th])
cylinder(h = height - bottom_th + 1, r = inner_r);
}
}
// --- 取手(リング状) ---
module handle() {
translate([outer_r + handle_offset, 0, handle_z])
rotate([90, 0, 0])
rotate_extrude(convexity = 10)
translate([handle_r, 0, 0])
circle(d = handle_thick);
}
// --- 組み立て ---
module mug() {
difference() {
union() {
cup_body();
// 取手はカップ外壁と干渉する部分を残して溶着
intersection() {
handle();
// カップ外側 + 壁に食い込む範囲のみ許可
cylinder(h = height, r = outer_r + handle_offset + handle_r + handle_thick);
}
}
// 内側の空洞を再度くり抜いて、取手が内壁に飛び出さないようにする
translate([0, 0, bottom_th])
cylinder(h = height - bottom_th + 1, r = inner_r);
}
}
mug(); パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。 底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。 さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。 取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。