bare/gpt-5.6-terra / tier-2-offset-handle-mug
success tier 2
bare (gpt 5.6 terra)
render
$fn = 128;
// マグ本体寸法
outer_r = 40; // 外径 80mm
inner_r = 35; // 内径 70mm
cup_h = 90;
bottom_t = 6;
// 取手寸法・配置
handle_y_thickness = 12;
handle_center_z = cup_h / 2;
attach_x = 37; // 本体外周へ十分に食い込ませる
outer_center_x = 47;
outer_r_handle = 24;
inner_left_x = 41;
inner_center_x = 51;
inner_r_handle = 15; // 内側高さ 30mm
// 内側幅: 41mm ~ 66mm = 25mm
module right_semicircle(cx, cz, r) {
intersection() {
translate([cx, cz])
circle(r = r);
translate([cx, cz - r])
square([r, 2 * r]);
}
}
module handle_profile_2d() {
difference() {
union() {
// 本体側の直線部分
translate([attach_x, handle_center_z - outer_r_handle])
square([
outer_center_x - attach_x,
2 * outer_r_handle
]);
// 外側半円部分
right_semicircle(
outer_center_x,
handle_center_z,
outer_r_handle
);
}
union() {
// 内側開口部の直線部分
translate([inner_left_x, handle_center_z - inner_r_handle])
square([
inner_center_x - inner_left_x,
2 * inner_r_handle
]);
// 内側開口部の半円部分
right_semicircle(
inner_center_x,
handle_center_z,
inner_r_handle
);
}
}
}
module handle() {
rotate([90, 0, 0])
linear_extrude(
height = handle_y_thickness,
center = true,
convexity = 10
)
handle_profile_2d();
}
union() {
// 中空マグ本体
difference() {
cylinder(h = cup_h, r = outer_r);
// 底厚 6mm を残す内部空間
translate([0, 0, bottom_t])
cylinder(h = cup_h - bottom_t + 0.1, r = inner_r);
}
// +X 軸方向のみに付く取手
handle();
} パラメータ (11) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、向きが指定されたマグカップを作ってください。 本体: - 外径 80mm、内径 70mm(肉厚 5mm)、高さ 90mm の円筒形マグ - 底面の厚みは 6mm - 内側は飲み物を入れられるよう中空 取手(handle): - マグの **+X 軸方向の側面のみ** に付ける(他の方向には付けない) - 取手は D 字形状(外側が半円、本体側が直線)で、本体外周にしっかり接続する - 取手の内側の空間は高さ 30mm × 幅 25mm(指 3 本ぐらい入る) - 取手はマグの高さ方向の中央付近に付ける - 本体と取手は確実に union され、マニフォールド(隙間や宙吊りなし)を保つ 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。