bare-low/gpt-5.5 / tier-2-offset-handle-mug
success tier 2
bare (gpt 5.5)
render
$fn = 128;
outer_d = 80;
inner_d = 70;
height = 90;
bottom_thickness = 6;
outer_r = outer_d / 2;
inner_r = inner_d / 2;
// Handle parameters
handle_depth = 16; // Y方向の厚み
handle_wall = 8;
handle_center_z = height / 2;
inner_handle_h = 30;
inner_handle_w = 25;
inner_x0 = outer_r + 4; // 取手内側の本体側直線位置
inner_rx = inner_handle_w;
inner_ry = inner_handle_h / 2;
outer_x0 = outer_r - 4; // 本体外周へ確実に食い込ませて接続
outer_rx = inner_handle_w + handle_wall * 2;
outer_ry = inner_ry + handle_wall;
module d_shape_2d(x0, zc, rx, ry, steps = 64) {
pts = concat(
[[x0, zc - ry], [x0, zc + ry]],
[for (i = [0 : steps])
let(a = 90 - 180 * i / steps)
[x0 + rx * cos(a), zc + ry * sin(a)]
]
);
polygon(points = pts);
}
module handle() {
rotate([90, 0, 0])
linear_extrude(height = handle_depth, center = true, convexity = 10)
difference() {
d_shape_2d(
outer_x0,
handle_center_z,
outer_rx,
outer_ry
);
d_shape_2d(
inner_x0,
handle_center_z,
inner_rx,
inner_ry
);
}
}
module mug_body_outer() {
cylinder(h = height, r = outer_r);
}
module mug_inner_void() {
translate([0, 0, bottom_thickness])
cylinder(h = height + 2, r = inner_r);
}
difference() {
union() {
mug_body_outer();
handle();
}
mug_inner_void();
} パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、向きが指定されたマグカップを作ってください。 本体: - 外径 80mm、内径 70mm(肉厚 5mm)、高さ 90mm の円筒形マグ - 底面の厚みは 6mm - 内側は飲み物を入れられるよう中空 取手(handle): - マグの **+X 軸方向の側面のみ** に付ける(他の方向には付けない) - 取手は D 字形状(外側が半円、本体側が直線)で、本体外周にしっかり接続する - 取手の内側の空間は高さ 30mm × 幅 25mm(指 3 本ぐらい入る) - 取手はマグの高さ方向の中央付近に付ける - 本体と取手は確実に union され、マニフォールド(隙間や宙吊りなし)を保つ 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。