vibe-openscad

tier-1-mug / claude-haiku-4-5-20251001

5 run / 累計 20.5s / 累計 $0.0166

claude haiku 4.5 2025-10-01 bare

bare (provider default effort)

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

// 取手のパラメータ
handle_radius = 12;
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 = height - bottom_thickness + 1, $fn = 100);
    }
}

// 取手(リング状)
module handle() {
    handle_distance = outer_radius + handle_radius;
    
    // 取手の中心位置
    translate([handle_distance, 0, handle_center_height])
        rotate([0, 90, 0])
            torus(r = handle_radius, R = handle_radius * 0.5);
}

// トーラス(ドーナツ状)を描画するモジュール
module torus(r = 10, R = 3) {
    rotate_extrude($fn = 100)
        translate([r, 0, 0])
            circle(r = R, $fn = 100);
}

// 全体の組み立て
union() {
    cup_body();
    handle();
}
パラメータ (5)
スライダを動かすと openscad-wasm で再レンダリング

prompt

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

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

variant: thinking

off (default) success
off
3.7s · 210/433t · $0.0024
SCAD (46 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;
inner_radius = outer_radius - wall_thickness;

// 取手のパラメータ
handle_radius = 12;
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 = height - bottom_thickness + 1, $fn = 100);
    }
}

// 取手(リング状)
module handle() {
    handle_distance = outer_radius + handle_radius;
    
    // 取手の中心位置
    translate([handle_distance, 0, handle_center_height])
        rotate([0, 90, 0])
            torus(r = handle_radius, R = handle_radius * 0.5);
}

// トーラス(ドーナツ状)を描画するモジュール
module torus(r = 10, R = 3) {
    rotate_extrude($fn = 100)
        translate([r, 0, 0])
            circle(r = R, $fn = 100);
}

// 全体の組み立て
union() {
    cup_body();
    handle();
}
adaptivenot run
dynamicnot run

iteration: iter-png

i1 success
iter 1
4.5s · 1392/503t · $0.0039
diff vs bare: +8/-15
  // マグカップのパラメータ
  outer_diameter = 80;
  outer_radius = outer_diameter / 2;
  height = 100;
  wall_thickness = 4;
  bottom_thickness = 6;
  inner_radius = outer_radius - wall_thickness;
  
  // 取手のパラメータ
- handle_radius = 12;
+ handle_tube_radius = 12;      // 取手チューブの半径
+ handle_major_radius = 25;     // 取手の中心までの距離
  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 = height - bottom_thickness + 1, $fn = 100);
      }
  }
  
- // 取手(リング状)
+ // 取手(リング状トーラス)
  module handle() {
-     handle_distance = outer_radius + handle_radius;
-     
-     // 取手の中心位置
-     translate([handle_distance, 0, handle_center_height])
-         rotate([0, 90, 0])
-             torus(r = handle_radius, R = handle_radius * 0.5);
+     translate([0, 0, handle_center_height])
+         rotate([0, 0, 0])
+             rotate_extrude(angle = 180, $fn = 100)
+                 translate([handle_major_radius, 0, 0])
+                     circle(r = handle_tube_radius, $fn = 100);
  }
  
- // トーラス(ドーナツ状)を描画するモジュール
- module torus(r = 10, R = 3) {
-     rotate_extrude($fn = 100)
-         translate([r, 0, 0])
-             circle(r = R, $fn = 100);
- }
- 
  // 全体の組み立て
  union() {
      cup_body();
      handle();
  }
SCAD (39 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;
inner_radius = outer_radius - wall_thickness;

// 取手のパラメータ
handle_tube_radius = 12;      // 取手チューブの半径
handle_major_radius = 25;     // 取手の中心までの距離
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 = height - bottom_thickness + 1, $fn = 100);
    }
}

// 取手(リング状トーラス)
module handle() {
    translate([0, 0, handle_center_height])
        rotate([0, 0, 0])
            rotate_extrude(angle = 180, $fn = 100)
                translate([handle_major_radius, 0, 0])
                    circle(r = handle_tube_radius, $fn = 100);
}

// 全体の組み立て
union() {
    cup_body();
    handle();
}
i2 success
iter 2
4.1s · 1354/481t · $0.0038
diff vs i1: +4/-5
  // マグカップのパラメータ
  outer_diameter = 80;
  outer_radius = outer_diameter / 2;
  height = 100;
  wall_thickness = 4;
  bottom_thickness = 6;
  inner_radius = outer_radius - wall_thickness;
  
  // 取手のパラメータ
  handle_tube_radius = 12;      // 取手チューブの半径
- handle_major_radius = 25;     // 取手の中心までの距離
+ handle_major_radius = 50;     // 取手の中心までの距離
  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 = height - bottom_thickness + 1, $fn = 100);
      }
  }
  
  // 取手(リング状トーラス)
  module handle() {
      translate([0, 0, handle_center_height])
-         rotate([0, 0, 0])
-             rotate_extrude(angle = 180, $fn = 100)
-                 translate([handle_major_radius, 0, 0])
-                     circle(r = handle_tube_radius, $fn = 100);
+         rotate_extrude($fn = 100)
+             translate([handle_major_radius, 0, 0])
+                 circle(r = handle_tube_radius, $fn = 100);
  }
  
  // 全体の組み立て
  union() {
      cup_body();
      handle();
  }
SCAD (38 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;
inner_radius = outer_radius - wall_thickness;

// 取手のパラメータ
handle_tube_radius = 12;      // 取手チューブの半径
handle_major_radius = 50;     // 取手の中心までの距離
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 = height - bottom_thickness + 1, $fn = 100);
    }
}

// 取手(リング状トーラス)
module handle() {
    translate([0, 0, handle_center_height])
        rotate_extrude($fn = 100)
            translate([handle_major_radius, 0, 0])
                circle(r = handle_tube_radius, $fn = 100);
}

// 全体の組み立て
union() {
    cup_body();
    handle();
}
i3 success
iter 3
4.5s · 1335/575t · $0.0042
diff vs i2: +8/-5
  // マグカップのパラメータ
  outer_diameter = 80;
  outer_radius = outer_diameter / 2;
  height = 100;
  wall_thickness = 4;
  bottom_thickness = 6;
  inner_radius = outer_radius - wall_thickness;
  
  // 取手のパラメータ
  handle_tube_radius = 12;      // 取手チューブの半径
- handle_major_radius = 50;     // 取手の中心までの距離
+ handle_major_radius = 38;     // 取手の中心までの距離(カップ外周から十分にはみ出す)
  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 = height - bottom_thickness + 1, $fn = 100);
      }
  }
  
- // 取手(リング状トーラス)
+ // 取手(片側に付くリング状トーラスの一部)
  module handle() {
      translate([0, 0, handle_center_height])
-         rotate_extrude($fn = 100)
-             translate([handle_major_radius, 0, 0])
-                 circle(r = handle_tube_radius, $fn = 100);
+         rotate([0, 0, -30])
+             difference() {
+                 rotate_extrude(angle = 60, $fn = 100)
+                     translate([handle_major_radius, 0, 0])
+                         circle(r = handle_tube_radius, $fn = 100);
+             }
  }
  
  // 全体の組み立て
  union() {
      cup_body();
      handle();
  }
SCAD (41 lines)
// マグカップのパラメータ
outer_diameter = 80;
outer_radius = outer_diameter / 2;
height = 100;
wall_thickness = 4;
bottom_thickness = 6;
inner_radius = outer_radius - wall_thickness;

// 取手のパラメータ
handle_tube_radius = 12;      // 取手チューブの半径
handle_major_radius = 38;     // 取手の中心までの距離(カップ外周から十分にはみ出す)
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 = height - bottom_thickness + 1, $fn = 100);
    }
}

// 取手(片側に付くリング状トーラスの一部)
module handle() {
    translate([0, 0, handle_center_height])
        rotate([0, 0, -30])
            difference() {
                rotate_extrude(angle = 60, $fn = 100)
                    translate([handle_major_radius, 0, 0])
                        circle(r = handle_tube_radius, $fn = 100);
            }
}

// 全体の組み立て
union() {
    cup_body();
    handle();
}