bare/claude-fable-5-1 / tier-1-mug
success tier 1
bare (claude fable 5.1)
render
// ===== マグカップ =====
$fn = 96;
// --- カップ本体パラメータ ---
outer_d = 80; // 外径
height = 100; // 高さ
wall_t = 4; // 側面の肉厚
bottom_t = 6; // 底面の厚み
// --- 取手パラメータ ---
handle_r = 12; // リング状取手の半径(リング中心線の半径)
handle_tube = 4; // リング断面(パイプ)の半径
handle_z = height / 2; // 取手の取り付け高さ(カップ中心高さ)
handle_x = outer_d/2 + handle_r; // リング中心のX座標(外周からリング半径分外側)
// カップ本体:外筒から内側をくり抜く
module cup_body() {
difference() {
cylinder(d = outer_d, h = height);
translate([0, 0, bottom_t])
cylinder(d = outer_d - 2 * wall_t, h = height);
}
}
// リング状の取手(トーラス)を側面に取り付け
module handle() {
translate([handle_x, 0, handle_z])
rotate([90, 0, 0]) // リングを縦(XZ平面)に立てる
rotate_extrude()
translate([handle_r, 0])
circle(r = handle_tube);
}
union() {
cup_body();
handle();
} パラメータ (6) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。 底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。 さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。 取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。