tier-1-mug / o3-2025-04-16
7 run / 累計 558.2s / 累計 $0.2832
openai o3 2025-04-16 bare prompt
OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。
底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。
さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。
取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。
完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。
variant: effort
32.1s
· 168/1918t · $0.0157
SCAD (40 lines)
// Parameters
mug_outer_radius = 40; // 80mm diameter
wall_thickness = 4;
bottom_thickness = 6;
mug_height = 100;
inner_radius = mug_outer_radius - wall_thickness; // 36mm
inner_height = mug_height - bottom_thickness; // 94mm
handle_major_radius = 12; // distance from torus center to tube center
handle_tube_radius = 4; // thickness of the handle tube
// Mug
module mug(){
difference(){
cylinder(h = mug_height, r = mug_outer_radius, $fn = 128);
translate([0,0,bottom_thickness])
cylinder(h = inner_height, r = inner_radius, $fn = 128);
}
}
// Torus (handle)
module torus(R, r){
rotate_extrude(convexity = 10, $fn = 128)
translate([R,0,0])
circle(r = r, $fn = 64);
}
// Handle positioned on the side
module handle(){
translate([mug_outer_radius + handle_major_radius - 2, 0, mug_height/2])
rotate([0,90,0]) // axis along X
torus(handle_major_radius, handle_tube_radius);
}
// Assemble
union(){
mug();
handle();
}
medium (default) success →
76.8s
· 168/5064t · $0.0408
SCAD (46 lines)
// マグカップ寸法
outer_d = 80; // 外径
outer_r = outer_d/2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
handle_R = 12; // リングの半径
handle_r = 4; // リングの太さ(チューブ半径)
handle_z = height/2; // 取手位置(高さ方向で中央)
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
translate([0,0,bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
translate([outer_r, 0, handle_z]) // 外周位置へ移動
rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}
221.5s
· 168/13825t · $0.1109
SCAD (37 lines)
// Mug dimensions
outer_diameter = 80;
outer_radius = outer_diameter / 2; // 40 mm
height = 100;
wall_thickness = 4;
bottom_thickness = 6;
// Handle dimensions
handle_radius = 12; // ring (major) radius
handle_thickness = 4; // cross-section (minor) radius
handle_offset = 2; // shifts handle axis outward for good overlap
handle_height = height / 2;
$fn = 100; // smoothness
module mug_body() {
cylinder(h = height, r = outer_radius);
}
module mug_handle() {
translate([outer_radius + handle_offset, 0, handle_height])
rotate([0, 90, 0])
rotate_extrude(convexity = 10)
translate([handle_radius, 0, 0])
circle(r = handle_thickness);
}
difference() {
union() {
mug_body();
mug_handle();
}
// Hollow interior
translate([0, 0, bottom_thickness])
cylinder(h = height - bottom_thickness,
r = outer_radius - wall_thickness);
}
—
—
iteration: iter-png
67.2s
· 1263/2488t · $0.0224
diff vs bare: +0/-0
// マグカップ寸法
outer_d = 80; // 外径
outer_r = outer_d/2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
handle_R = 12; // リングの半径
handle_r = 4; // リングの太さ(チューブ半径)
handle_z = height/2; // 取手位置(高さ方向で中央)
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
translate([0,0,bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
translate([outer_r, 0, handle_z]) // 外周位置へ移動
rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}
SCAD (46 lines)
// マグカップ寸法
outer_d = 80; // 外径
outer_r = outer_d/2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
handle_R = 12; // リングの半径
handle_r = 4; // リングの太さ(チューブ半径)
handle_z = height/2; // 取手位置(高さ方向で中央)
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
translate([0,0,bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
translate([outer_r, 0, handle_z]) // 外周位置へ移動
rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}
15.5s
· 1263/1988t · $0.0184
diff vs i1: +4/-4
// マグカップ寸法
outer_d = 80; // 外径
outer_r = outer_d/2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
- handle_R = 12; // リングの半径
- handle_r = 4; // リングの太さ(チューブ半径)
+ handle_R = 12; // リングの半径(中心からチューブ中心まで)
+ handle_r = 4; // リングのチューブ半径
handle_z = height/2; // 取手位置(高さ方向で中央)
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
translate([0,0,bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
- translate([outer_r, 0, handle_z]) // 外周位置へ移動
- rotate([0, 90, 0]) // 垂直面に立てる
+ translate([outer_r + handle_R, 0, handle_z]) // 外壁からはみ出す位置へ移動
+ rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}
SCAD (46 lines)
// マグカップ寸法
outer_d = 80; // 外径
outer_r = outer_d/2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
handle_R = 12; // リングの半径(中心からチューブ中心まで)
handle_r = 4; // リングのチューブ半径
handle_z = height/2; // 取手位置(高さ方向で中央)
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
translate([0,0,bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
translate([outer_r + handle_R, 0, handle_z]) // 外壁からはみ出す位置へ移動
rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}
68.3s
· 1275/3934t · $0.0340
diff vs i2: +7/-7
// マグカップ寸法
outer_d = 80; // 外径
- outer_r = outer_d/2;
+ outer_r = outer_d / 2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
- handle_R = 12; // リングの半径(中心からチューブ中心まで)
- handle_r = 4; // リングのチューブ半径
- handle_z = height/2; // 取手位置(高さ方向で中央)
+ handle_R = 12; // リングの半径(中心線半径)
+ handle_r = 4; // リング断面の半径
+ handle_z = height / 2; // 取手中心高さ
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
- translate([0,0,bottom])
+ translate([0, 0, bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
- translate([outer_r + handle_R, 0, handle_z]) // 外壁からはみ出す位置へ移動
- rotate([0, 90, 0]) // 垂直面に立てる
+ translate([outer_r, 0, handle_z]) // 外壁に接する位置へ移動
+ rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}
SCAD (46 lines)
// マグカップ寸法
outer_d = 80; // 外径
outer_r = outer_d / 2;
height = 100; // 全高
wall = 4; // 肉厚
bottom = 6; // 底厚
// 内部計算
inner_r = outer_r - wall;
inner_h = height - bottom;
// 取手寸法
handle_R = 12; // リングの半径(中心線半径)
handle_r = 4; // リング断面の半径
handle_z = height / 2; // 取手中心高さ
$fn = 128; // 滑らかさ
// カップ本体
module cup() {
difference() {
cylinder(h = height, r = outer_r);
translate([0, 0, bottom])
cylinder(h = inner_h, r = inner_r);
}
}
// トーラス(リング)生成
module torus(R, r) {
rotate_extrude()
translate([R, 0, 0])
circle(r = r);
}
// 取手
module handle() {
translate([outer_r, 0, handle_z]) // 外壁に接する位置へ移動
rotate([0, 90, 0]) // 垂直面に立てる
torus(handle_R, handle_r);
}
// 組み立て
union() {
cup();
handle();
}