vibe-openscad

tier-1-mug / claude-opus-4-5-20251101

7 run / 累計 37.4s / 累計 $0.0911

claude opus 4.5 2025-11-01 bare

bare (provider default effort)

run detail →
render
bare render of tier-1-mug
loading STL…
success 6.0s · 210/432t · $0.0118
SCAD (42 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_ring_radius = 12;  // 取手リングの半径
handle_tube_radius = 5;   // 取手の太さ(断面半径)
handle_center_height = height / 2;  // 取手の中心高さ

module cup_body() {
    difference() {
        // 外側の円柱
        cylinder(r = outer_radius, h = height, $fn = 100);
        
        // 内側のくり抜き
        translate([0, 0, bottom_thickness])
            cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
    }
}

module handle() {
    // 取手の位置(カップの外周から取手リングの中心までの距離)
    handle_offset = outer_radius + handle_ring_radius - handle_tube_radius / 2;
    
    translate([handle_offset, 0, handle_center_height])
        rotate([0, 90, 0])
            rotate_extrude(angle = 360, $fn = 60)
                translate([handle_ring_radius, 0, 0])
                    circle(r = handle_tube_radius, $fn = 30);
}

// マグカップ本体
cup_body();

// 取手
handle();
パラメータ (6)
スライダを動かすと openscad-wasm で再レンダリング

prompt

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

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

variant: effort

low success
low
3.2s · 311/117t · $0.0045
SCAD (15 lines)
$fn = 50;

// カップ本体
difference() {
    cylinder(d=80, h=100);
    translate([0, 0, 6])
        cylinder(d=72, h=95);
}

// 取手
translate([40, 0, 50])
rotate([0, 90, 0])
rotate_extrude()
translate([20, 0, 0])
circle(r=6);
mediumnot run
high (default) success
high
6.0s · 210/432t · $0.0118
SCAD (42 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_ring_radius = 12;  // 取手リングの半径
handle_tube_radius = 5;   // 取手の太さ(断面半径)
handle_center_height = height / 2;  // 取手の中心高さ

module cup_body() {
    difference() {
        // 外側の円柱
        cylinder(r = outer_radius, h = height, $fn = 100);
        
        // 内側のくり抜き
        translate([0, 0, bottom_thickness])
            cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
    }
}

module handle() {
    // 取手の位置(カップの外周から取手リングの中心までの距離)
    handle_offset = outer_radius + handle_ring_radius - handle_tube_radius / 2;
    
    translate([handle_offset, 0, handle_center_height])
        rotate([0, 90, 0])
            rotate_extrude(angle = 360, $fn = 60)
                translate([handle_ring_radius, 0, 0])
                    circle(r = handle_tube_radius, $fn = 30);
}

// マグカップ本体
cup_body();

// 取手
handle();
maxnot run
xhighnot run

variant: thinking

off (default) success
off
3.2s · 311/117t · $0.0045
SCAD (15 lines)
$fn = 50;

// カップ本体
difference() {
    cylinder(d=80, h=100);
    translate([0, 0, 6])
        cylinder(d=72, h=95);
}

// 取手
translate([40, 0, 50])
rotate([0, 90, 0])
rotate_extrude()
translate([20, 0, 0])
circle(r=6);
adaptivenot run
dynamicnot run

iteration: iter-png

i1 success
iter 1
7.2s · 1391/517t · $0.0199
diff vs bare: +6/-4
  // マグカップのパラメータ
  outer_diameter = 80;
  outer_radius = outer_diameter / 2;
  height = 100;
  wall_thickness = 4;
  bottom_thickness = 6;
  
  inner_radius = outer_radius - wall_thickness;
  inner_height = height - bottom_thickness;
  
  // 取手のパラメータ
  handle_ring_radius = 12;  // 取手リングの半径
  handle_tube_radius = 5;   // 取手の太さ(断面半径)
  handle_center_height = height / 2;  // 取手の中心高さ
  
  module cup_body() {
      difference() {
          // 外側の円柱
          cylinder(r = outer_radius, h = height, $fn = 100);
          
          // 内側のくり抜き
          translate([0, 0, bottom_thickness])
              cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
      }
  }
  
  module handle() {
      // 取手の位置(カップの外周から取手リングの中心までの距離)
-     handle_offset = outer_radius + handle_ring_radius - handle_tube_radius / 2;
+     handle_offset = outer_radius + handle_ring_radius;
      
+     // 縦向きのリング状取手(YZ平面上のトーラス)
      translate([handle_offset, 0, handle_center_height])
          rotate([0, 90, 0])
-             rotate_extrude(angle = 360, $fn = 60)
-                 translate([handle_ring_radius, 0, 0])
-                     circle(r = handle_tube_radius, $fn = 30);
+             rotate([90, 0, 0])
+                 rotate_extrude(angle = 360, $fn = 60)
+                     translate([handle_ring_radius, 0, 0])
+                         circle(r = handle_tube_radius, $fn = 30);
  }
  
  // マグカップ本体
  cup_body();
  
  // 取手
  handle();
SCAD (44 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_ring_radius = 12;  // 取手リングの半径
handle_tube_radius = 5;   // 取手の太さ(断面半径)
handle_center_height = height / 2;  // 取手の中心高さ

module cup_body() {
    difference() {
        // 外側の円柱
        cylinder(r = outer_radius, h = height, $fn = 100);
        
        // 内側のくり抜き
        translate([0, 0, bottom_thickness])
            cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
    }
}

module handle() {
    // 取手の位置(カップの外周から取手リングの中心までの距離)
    handle_offset = outer_radius + handle_ring_radius;
    
    // 縦向きのリング状取手(YZ平面上のトーラス)
    translate([handle_offset, 0, handle_center_height])
        rotate([0, 90, 0])
            rotate([90, 0, 0])
                rotate_extrude(angle = 360, $fn = 60)
                    translate([handle_ring_radius, 0, 0])
                        circle(r = handle_tube_radius, $fn = 30);
}

// マグカップ本体
cup_body();

// 取手
handle();
i2 success
iter 2
5.4s · 1421/448t · $0.0183
diff vs i1: +6/-7
  // マグカップのパラメータ
  outer_diameter = 80;
  outer_radius = outer_diameter / 2;
  height = 100;
  wall_thickness = 4;
  bottom_thickness = 6;
  
  inner_radius = outer_radius - wall_thickness;
  inner_height = height - bottom_thickness;
  
  // 取手のパラメータ
  handle_ring_radius = 12;  // 取手リングの半径
  handle_tube_radius = 5;   // 取手の太さ(断面半径)
  handle_center_height = height / 2;  // 取手の中心高さ
  
  module cup_body() {
      difference() {
          // 外側の円柱
          cylinder(r = outer_radius, h = height, $fn = 100);
          
          // 内側のくり抜き
          translate([0, 0, bottom_thickness])
              cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
      }
  }
  
  module handle() {
-     // 取手の位置(カップの外周から取手リングの中心までの距離)
+     // 取手の位置(カップの外周に接するように配置)
      handle_offset = outer_radius + handle_ring_radius;
      
-     // 縦向きのリング状取手(YZ平面上のトーラス)
+     // 縦向きのリング状取手(XZ平面に平行、指を通せる向き)
      translate([handle_offset, 0, handle_center_height])
-         rotate([0, 90, 0])
-             rotate([90, 0, 0])
-                 rotate_extrude(angle = 360, $fn = 60)
-                     translate([handle_ring_radius, 0, 0])
-                         circle(r = handle_tube_radius, $fn = 30);
+         rotate([90, 0, 90])
+             rotate_extrude(angle = 360, $fn = 60)
+                 translate([handle_ring_radius, 0, 0])
+                     circle(r = handle_tube_radius, $fn = 30);
  }
  
  // マグカップ本体
  cup_body();
  
  // 取手
  handle();
SCAD (43 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_ring_radius = 12;  // 取手リングの半径
handle_tube_radius = 5;   // 取手の太さ(断面半径)
handle_center_height = height / 2;  // 取手の中心高さ

module cup_body() {
    difference() {
        // 外側の円柱
        cylinder(r = outer_radius, h = height, $fn = 100);
        
        // 内側のくり抜き
        translate([0, 0, bottom_thickness])
            cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
    }
}

module handle() {
    // 取手の位置(カップの外周に接するように配置)
    handle_offset = outer_radius + handle_ring_radius;
    
    // 縦向きのリング状取手(XZ平面に平行、指を通せる向き)
    translate([handle_offset, 0, handle_center_height])
        rotate([90, 0, 90])
            rotate_extrude(angle = 360, $fn = 60)
                translate([handle_ring_radius, 0, 0])
                    circle(r = handle_tube_radius, $fn = 30);
}

// マグカップ本体
cup_body();

// 取手
handle();
i3 success
iter 3
6.5s · 1407/530t · $0.0203
diff vs i2: +3/-3
  // マグカップのパラメータ
  outer_diameter = 80;
  outer_radius = outer_diameter / 2;
  height = 100;
  wall_thickness = 4;
  bottom_thickness = 6;
  
  inner_radius = outer_radius - wall_thickness;
  inner_height = height - bottom_thickness;
  
  // 取手のパラメータ
  handle_ring_radius = 12;  // 取手リングの半径
  handle_tube_radius = 5;   // 取手の太さ(断面半径)
  handle_center_height = height / 2;  // 取手の中心高さ
  
  module cup_body() {
      difference() {
          // 外側の円柱
          cylinder(r = outer_radius, h = height, $fn = 100);
          
          // 内側のくり抜き
          translate([0, 0, bottom_thickness])
              cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
      }
  }
  
  module handle() {
-     // 取手の位置(カップの外周に接するように配置)
+     // 取手の位置(カップの外周から外側に飛び出すように配置)
      handle_offset = outer_radius + handle_ring_radius;
      
-     // 縦向きのリング状取手(XZ平面に平行、指を通せる向き)
+     // 縦向きのリング状取手(YZ平面に平行、指を縦に通せる向き)
      translate([handle_offset, 0, handle_center_height])
-         rotate([90, 0, 90])
+         rotate([0, 90, 0])
              rotate_extrude(angle = 360, $fn = 60)
                  translate([handle_ring_radius, 0, 0])
                      circle(r = handle_tube_radius, $fn = 30);
  }
  
  // マグカップ本体
  cup_body();
  
  // 取手
  handle();
SCAD (43 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;

inner_radius = outer_radius - wall_thickness;
inner_height = height - bottom_thickness;

// 取手のパラメータ
handle_ring_radius = 12;  // 取手リングの半径
handle_tube_radius = 5;   // 取手の太さ(断面半径)
handle_center_height = height / 2;  // 取手の中心高さ

module cup_body() {
    difference() {
        // 外側の円柱
        cylinder(r = outer_radius, h = height, $fn = 100);
        
        // 内側のくり抜き
        translate([0, 0, bottom_thickness])
            cylinder(r = inner_radius, h = inner_height + 1, $fn = 100);
    }
}

module handle() {
    // 取手の位置(カップの外周から外側に飛び出すように配置)
    handle_offset = outer_radius + handle_ring_radius;
    
    // 縦向きのリング状取手(YZ平面に平行、指を縦に通せる向き)
    translate([handle_offset, 0, handle_center_height])
        rotate([0, 90, 0])
            rotate_extrude(angle = 360, $fn = 60)
                translate([handle_ring_radius, 0, 0])
                    circle(r = handle_tube_radius, $fn = 30);
}

// マグカップ本体
cup_body();

// 取手
handle();