bare/gpt-4.1 / tier-1-mug
success tier 1
bare (gpt 4.1)
render
// パラメータ
cup_outer_diameter = 80;
cup_height = 100;
cup_wall_thickness = 4;
cup_bottom_thickness = 6;
cup_inner_diameter = cup_outer_diameter - 2 * cup_wall_thickness;
cup_inner_height = cup_height - cup_bottom_thickness;
handle_radius = 12;
handle_thickness = 4; // リング取手の断面厚み
handle_clearance = 6; // カップ外からの飛び出し余裕
module cup() {
difference() {
// 外側のカップ
cylinder(d=cup_outer_diameter, h=cup_height, $fn=128);
// 内側 (飲み物が入る部分)
translate([0,0,cup_bottom_thickness])
cylinder(d=cup_inner_diameter, h=cup_inner_height, $fn=128);
}
}
module handle() {
// 取手の中心がカップ外周から sufficient clearance で外側に出るように配置
// y方向(外径方向)にオフセット
angle_span = 220; // 取手リングの円弧(度)
angle_start = -angle_span/2;
angle_end = angle_span/2;
// 取手の中心位置
handle_center_offset = (cup_outer_diameter/2) + handle_radius + handle_clearance;
// 取手(トーラスの一部)の断面円
rotate([90,0,0])
translate([0,handle_center_offset,cup_height/2])
rotate([0,0,90])
arc_torus(handle_radius, handle_thickness/2, angle_span);
}
// 部分的なトーラス(円弧状の取手)
module arc_torus(major_r, minor_r, angle) {
// angle: 度数法で制限
$fn_arc = 100; // 精度
rotate_extrude(angle=angle, $fn=$fn_arc)
translate([major_r,0,0])
circle(r=minor_r, $fn=32);
}
// マグカップ本体+取手
union() {
cup();
handle();
} パラメータ (7) —
スライダを動かすと openscad-wasm で再レンダリング
iteration chain
各 iteration step は独立した benchmark run です。parentRunId で前段にリンクします。
→ children (1)
prompt
OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。 底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。 さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。 取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。 完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。