bare-think-off/gemini-3-flash / tier-2-offset-handle-mug
success tier 2
bare (gemini 3 flash)
render
// Mug Parameters
outer_diameter = 80;
inner_diameter = 70;
mug_height = 90;
bottom_thickness = 6;
// Handle Parameters
handle_inner_h = 30; // Height of the opening
handle_inner_w = 25; // Width of the opening
handle_thickness = 8; // Thickness of the handle material
$fn = 100;
union() {
// Mug Body
difference() {
// Outer Cylinder
cylinder(h = mug_height, d = outer_diameter);
// Inner Hollow
translate([0, 0, bottom_thickness])
cylinder(h = mug_height, d = inner_diameter);
}
// Handle (Positioned in +X direction)
translate([outer_diameter / 2 - 2, 0, mug_height / 2]) { // -2 for slight overlap to ensure union
rotate([90, 0, 90]) {
difference() {
// Outer D-shape (Approximated by rounded rectangle)
hull() {
translate([handle_inner_h / 2, 0, 0])
cylinder(h = handle_thickness, d = handle_inner_h + (handle_thickness * 2), center = true);
translate([-handle_inner_h / 2, 0, 0])
cylinder(h = handle_thickness, d = handle_inner_h + (handle_thickness * 2), center = true);
// Square part connecting to the body
translate([0, -(handle_inner_w + handle_thickness) / 2, 0])
cube([handle_inner_h + handle_thickness * 2, 1, handle_thickness], center = true);
}
// Inner Hollow of D-shape
hull() {
translate([handle_inner_h / 2, 0, 0])
cylinder(h = handle_thickness + 2, d = handle_inner_h, center = true);
translate([-handle_inner_h / 2, 0, 0])
cylinder(h = handle_thickness + 2, d = handle_inner_h, center = true);
// Cutout towards the mug wall
translate([0, -handle_inner_w, 0])
cube([handle_inner_h, handle_inner_w, handle_thickness + 2], center = true);
}
}
}
}
} パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング
prompt
OpenSCAD で、向きが指定されたマグカップを作ってください。 本体: - 外径 80mm、内径 70mm(肉厚 5mm)、高さ 90mm の円筒形マグ - 底面の厚みは 6mm - 内側は飲み物を入れられるよう中空 取手(handle): - マグの **+X 軸方向の側面のみ** に付ける(他の方向には付けない) - 取手は D 字形状(外側が半円、本体側が直線)で、本体外周にしっかり接続する - 取手の内側の空間は高さ 30mm × 幅 25mm(指 3 本ぐらい入る) - 取手はマグの高さ方向の中央付近に付ける - 本体と取手は確実に union され、マニフォールド(隙間や宙吊りなし)を保つ 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。