bare-low/o4-mini / tier-2-offset-handle-mug
success tier 2
bare (o4 mini)
render
// マグカップ本体とハンドル
$fn = 100;
// パラメータ
outer_d = 80;
inner_d = 70;
height_body = 90;
thickness_bottom = 6;
handle_gap_w = 25; // 指入れ幅
handle_gap_h = 30; // 指入れ高さ
handle_th = 8; // 取手肉厚
handle_zpos = (height_body - handle_gap_h) / 2; // 取手の底面Z位置
handle_center_x = outer_d/2 + handle_gap_w + handle_th; // 半円中心X
union() {
// 本体外側
cylinder(d = outer_d, h = height_body);
// 飲み物入る中空部 (底厚みを残して上部をくり抜き)
translate([0, 0, thickness_bottom])
cylinder(d = inner_d, h = height_body - thickness_bottom);
// 取手(D字形、Z方向に厚みを持たせる)
translate([0, 0, handle_zpos]) rotate([0, 0, 90]) // Z方向が高さ
linear_extrude(height = handle_th) {
// 2次元断面:半円と角矩形の交差でD字型
intersection() {
// 外側半円
translate([handle_center_x, 0])
circle(r = handle_th, $fn = 100);
// 高さ制限
translate([handle_center_x-handle_th, -handle_gap_h/2])
square([handle_th*2, handle_gap_h]);
}
}
} パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、向きが指定されたマグカップを作ってください。 本体: - 外径 80mm、内径 70mm(肉厚 5mm)、高さ 90mm の円筒形マグ - 底面の厚みは 6mm - 内側は飲み物を入れられるよう中空 取手(handle): - マグの **+X 軸方向の側面のみ** に付ける(他の方向には付けない) - 取手は D 字形状(外側が半円、本体側が直線)で、本体外周にしっかり接続する - 取手の内側の空間は高さ 30mm × 幅 25mm(指 3 本ぐらい入る) - 取手はマグの高さ方向の中央付近に付ける - 本体と取手は確実に union され、マニフォールド(隙間や宙吊りなし)を保つ 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。