bare-high/o4-mini / tier-1-mug
success tier 1
bare (o4 mini)
render
$fn = 100;
outer_d = 80;
height = 100;
wall_thick = 4;
bottom_thick = 6;
outer_r = outer_d/2;
inner_r = outer_r - wall_thick;
handle_r = 12;
module mug() {
difference() {
// 外胴
cylinder(h = height, r = outer_r);
// 内胴(底面厚みを残して上部をくり抜く)
translate([0, 0, bottom_thick])
cylinder(h = height - bottom_thick, r = inner_r);
}
}
module handle() {
// リング状の取手を torus で作成(マグ外周に面一接触)
rotate([90, 0, 0])
rotate_extrude()
translate([outer_r + handle_r, 0])
circle(r = handle_r);
}
union() {
mug();
// 取手はカップの中心高さに配置
translate([0, 0, height/2])
handle();
} パラメータ (5) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。 底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。 さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。 取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。