vibe-openscad

tier-1-mug / gpt-5.4-mini-2026-03-17

7 run / 累計 105.1s / 累計 $0.0500

openai gpt 5.4 mini 2026-03-17 bare

bare (provider default effort)

run detail →
render
bare render of tier-1-mug
loading STL…
success 2.9s · 168/281t · $0.0030
SCAD (42 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

handle_r = 12;
handle_tube_r = 4;   // 取手の太さ
handle_z = height * 0.55;
handle_clear = 10;   // カップ外周からの余裕

module mug_body() {
    difference() {
        // 外形
        cylinder(h = height, d = outer_d);

        // 内側のくり抜き
        translate([0, 0, bottom])
            cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
    }
}

module ring_handle() {
    // カップ外周から十分にはみ出すように配置
    handle_center_x = outer_d / 2 + handle_clear + handle_r;

    translate([handle_center_x, 0, handle_z])
        rotate([0, 90, 0])
            torus(handle_r, handle_tube_r);
}

module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r);
}

union() {
    mug_body();
    ring_handle();
}
パラメータ (7)
スライダを動かすと openscad-wasm で再レンダリング

prompt

OpenSCAD で、外径 80mm、高さ 100mm、肉厚 4mm のマグカップを作ってください。
底面の厚みは 6mm とし、内側はくり抜いて飲み物を入れられる形状にしてください。
さらに、側面には外径方向に飛び出す半径 12mm の取手(リング状の取手)を付けてください。
取手はカップの中心高さあたりに付け、外周から十分にはみ出して指を通せる形にしてください。

完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。

variant: effort

low success
low
12.2s · 168/1611t · $0.0049
SCAD (27 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

module mug_body() {
    difference() {
        cylinder(d = outer_d, h = height);
        translate([0, 0, bottom])
            cylinder(d = outer_d - 2 * wall, h = height - bottom + 0.1);
    }
}

module ring_handle() {
    translate([outer_d/2 + 12 - 4, 0, height/2])
        rotate([90, 0, 0])
            rotate_extrude(convexity = 10)
                translate([12, 0, 0])
                    circle(r = 4);
}

union() {
    mug_body();
    ring_handle();
}
medium (default) success
medium
2.9s · 168/281t · $0.0030
SCAD (42 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

handle_r = 12;
handle_tube_r = 4;   // 取手の太さ
handle_z = height * 0.55;
handle_clear = 10;   // カップ外周からの余裕

module mug_body() {
    difference() {
        // 外形
        cylinder(h = height, d = outer_d);

        // 内側のくり抜き
        translate([0, 0, bottom])
            cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
    }
}

module ring_handle() {
    // カップ外周から十分にはみ出すように配置
    handle_center_x = outer_d / 2 + handle_clear + handle_r;

    translate([handle_center_x, 0, handle_z])
        rotate([0, 90, 0])
            torus(handle_r, handle_tube_r);
}

module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r);
}

union() {
    mug_body();
    ring_handle();
}
high success
high
78.2s · 168/11658t · $0.0350
SCAD (27 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

handle_R = 12;
handle_r = 3;

module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r, $fn = 64);
}

union() {
    difference() {
        cylinder(h = height, r = outer_d / 2);
        translate([0, 0, bottom])
            cylinder(h = height - bottom + 0.2, r = outer_d / 2 - wall);
    }

    translate([outer_d / 2 + handle_R, 0, height / 2])
        rotate([90, 0, 0])
            torus(handle_R, handle_r);
}
maxnot run
xhighnot run

iteration: iter-png

i1 success
iter 1
3.4s · 1109/298t · $0.0013
diff vs bare: +14/-14
  $fn = 128;
  
  outer_d = 80;
  height = 100;
  wall = 4;
  bottom = 6;
  
- handle_r = 12;
- handle_tube_r = 4;   // 取手の太さ
- handle_z = height * 0.55;
- handle_clear = 10;   // カップ外周からの余裕
+ handle_ring_r = 12;   // 取手の半径
+ handle_tube_r = 4;    // 取手の太さ
+ handle_z = height * 0.5;
+ handle_clear = 8;     // 外周からのはみ出し量
  
  module mug_body() {
      difference() {
          // 外形
          cylinder(h = height, d = outer_d);
  
-         // 内側のくり抜き
+         // 内側のくり抜き(底厚 6mm)
          translate([0, 0, bottom])
              cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
      }
  }
  
- module ring_handle() {
-     // カップ外周から十分にはみ出すように配置
-     handle_center_x = outer_d / 2 + handle_clear + handle_r;
- 
-     translate([handle_center_x, 0, handle_z])
-         rotate([0, 90, 0])
-             torus(handle_r, handle_tube_r);
- }
- 
  module torus(R, r) {
      rotate_extrude(convexity = 10)
          translate([R, 0, 0])
              circle(r = r);
  }
  
+ module ring_handle() {
+     // カップ外周から十分に外側へ配置
+     handle_center_x = outer_d / 2 + handle_clear + handle_ring_r;
+ 
+     translate([handle_center_x, 0, handle_z])
+         rotate([0, 90, 0])
+             torus(handle_ring_r, handle_tube_r);
+ }
+ 
  union() {
      mug_body();
      ring_handle();
  }
SCAD (42 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

handle_ring_r = 12;   // 取手の半径
handle_tube_r = 4;    // 取手の太さ
handle_z = height * 0.5;
handle_clear = 8;     // 外周からのはみ出し量

module mug_body() {
    difference() {
        // 外形
        cylinder(h = height, d = outer_d);

        // 内側のくり抜き(底厚 6mm)
        translate([0, 0, bottom])
            cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
    }
}

module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r);
}

module ring_handle() {
    // カップ外周から十分に外側へ配置
    handle_center_x = outer_d / 2 + handle_clear + handle_ring_r;

    translate([handle_center_x, 0, handle_z])
        rotate([0, 90, 0])
            torus(handle_ring_r, handle_tube_r);
}

union() {
    mug_body();
    ring_handle();
}
i2 success
iter 2
2.8s · 1126/290t · $0.0013
diff vs i1: +7/-10
  $fn = 128;
  
  outer_d = 80;
  height = 100;
  wall = 4;
  bottom = 6;
  
- handle_ring_r = 12;   // 取手の半径
- handle_tube_r = 4;    // 取手の太さ
- handle_z = height * 0.5;
- handle_clear = 8;     // 外周からのはみ出し量
+ handle_major_r = 12;   // 取手のリング半径
+ handle_tube_r   = 4;   // 取手の太さ
+ handle_z        = height * 0.5;
+ handle_gap      = 2;   // カップ外周からの最小クリアランス
  
  module mug_body() {
      difference() {
-         // 外形
          cylinder(h = height, d = outer_d);
- 
-         // 内側のくり抜き(底厚 6mm)
          translate([0, 0, bottom])
              cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
      }
  }
  
  module torus(R, r) {
      rotate_extrude(convexity = 10)
          translate([R, 0, 0])
              circle(r = r);
  }
  
  module ring_handle() {
-     // カップ外周から十分に外側へ配置
-     handle_center_x = outer_d / 2 + handle_clear + handle_ring_r;
+     // 取手がカップ外周から十分にはみ出すように配置
+     handle_center_x = outer_d / 2 + handle_gap + handle_major_r;
  
      translate([handle_center_x, 0, handle_z])
          rotate([0, 90, 0])
-             torus(handle_ring_r, handle_tube_r);
+             torus(handle_major_r, handle_tube_r);
  }
  
  union() {
      mug_body();
      ring_handle();
  }
SCAD (39 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

handle_major_r = 12;   // 取手のリング半径
handle_tube_r   = 4;   // 取手の太さ
handle_z        = height * 0.5;
handle_gap      = 2;   // カップ外周からの最小クリアランス

module mug_body() {
    difference() {
        cylinder(h = height, d = outer_d);
        translate([0, 0, bottom])
            cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
    }
}

module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r);
}

module ring_handle() {
    // 取手がカップ外周から十分にはみ出すように配置
    handle_center_x = outer_d / 2 + handle_gap + handle_major_r;

    translate([handle_center_x, 0, handle_z])
        rotate([0, 90, 0])
            torus(handle_major_r, handle_tube_r);
}

union() {
    mug_body();
    ring_handle();
}
i3 success
iter 3
2.6s · 1118/299t · $0.0013
diff vs i2: +6/-5
  $fn = 128;
  
  outer_d = 80;
  height = 100;
  wall = 4;
  bottom = 6;
  
- handle_major_r = 12;   // 取手のリング半径
- handle_tube_r   = 4;   // 取手の太さ
+ handle_major_r = 12;   // リングの中心線半径
+ handle_tube_r   = 4;   // 取手の断面半径
  handle_z        = height * 0.5;
- handle_gap      = 2;   // カップ外周からの最小クリアランス
  
+ // カップ本体
  module mug_body() {
      difference() {
          cylinder(h = height, d = outer_d);
          translate([0, 0, bottom])
              cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
      }
  }
  
+ // リング状取手
  module torus(R, r) {
      rotate_extrude(convexity = 10)
          translate([R, 0, 0])
              circle(r = r);
  }
  
  module ring_handle() {
-     // 取手がカップ外周から十分にはみ出すように配置
-     handle_center_x = outer_d / 2 + handle_gap + handle_major_r;
+     // 外径80mmの側面から十分にはみ出し、指を通しやすいように配置
+     handle_center_x = outer_d / 2 + handle_major_r + handle_tube_r + 2;
  
      translate([handle_center_x, 0, handle_z])
          rotate([0, 90, 0])
              torus(handle_major_r, handle_tube_r);
  }
  
  union() {
      mug_body();
      ring_handle();
  }
SCAD (40 lines)
$fn = 128;

outer_d = 80;
height = 100;
wall = 4;
bottom = 6;

handle_major_r = 12;   // リングの中心線半径
handle_tube_r   = 4;   // 取手の断面半径
handle_z        = height * 0.5;

// カップ本体
module mug_body() {
    difference() {
        cylinder(h = height, d = outer_d);
        translate([0, 0, bottom])
            cylinder(h = height - bottom + 0.5, d = outer_d - 2 * wall);
    }
}

// リング状取手
module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r);
}

module ring_handle() {
    // 外径80mmの側面から十分にはみ出し、指を通しやすいように配置
    handle_center_x = outer_d / 2 + handle_major_r + handle_tube_r + 2;

    translate([handle_center_x, 0, handle_z])
        rotate([0, 90, 0])
            torus(handle_major_r, handle_tube_r);
}

union() {
    mug_body();
    ring_handle();
}