vibe-openscad

tier-1-mug / claude-fable-5

9 run / 累計 261.2s / 累計 $1.02

claude fable 5 bare

bare (provider default effort)

run detail →
render
bare render of tier-1-mug
loading STL…
success 23.6s · 220/1698t · $0.0871
SCAD (34 lines)
// マグカップ
$fn = 100;

// パラメータ
outer_d       = 80;   // 外径
cup_h         = 100;  // 高さ
wall_t        = 4;    // 側面の肉厚
bottom_t      = 6;    // 底面の厚み
handle_r      = 12;   // 取手リングの半径(中心円の半径)
handle_tube_r = 5;    // 取手の太さ(断面半径)

// 取手(トーラス)
module handle() {
    // カップ外壁に少し食い込ませて接合し、外側へ大きく張り出す
    translate([outer_d/2 + 8, 0, cup_h/2])
        rotate([90, 0, 0])
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_tube_r);
}

// マグカップ本体
difference() {
    union() {
        // カップ外形
        cylinder(h = cup_h, d = outer_d);
        // 取手
        handle();
    }
    // 内側をくり抜く(底面厚 6mm を残す)
    // 取手がカップ内部にはみ出した部分もここで除去される
    translate([0, 0, bottom_t])
        cylinder(h = cup_h, d = outer_d - 2 * wall_t);
}
パラメータ (6)
スライダを動かすと openscad-wasm で再レンダリング

prompt

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

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

variant: effort

low success
low
7.0s · 220/428t · $0.0236
SCAD (29 lines)
// マグカップ
// 外径 80mm (半径 40mm)、高さ 100mm、肉厚 4mm、底厚 6mm
// 半径 12mm のリング状取手付き

$fn = 100;

cup_outer_r = 40;   // 外半径
cup_h       = 100;  // 高さ
wall_t      = 4;    // 肉厚
bottom_t    = 6;    // 底厚

handle_r      = 12; // 取手リングの半径(中心円)
handle_tube_r = 5;  // 取手の太さ(断面半径)

union() {
    // カップ本体(くり抜き)
    difference() {
        cylinder(h = cup_h, r = cup_outer_r);
        translate([0, 0, bottom_t])
            cylinder(h = cup_h - bottom_t + 1, r = cup_outer_r - wall_t);
    }

    // 取手(トーラス)を側面の中心高さに取り付け
    translate([cup_outer_r + handle_r - 2, 0, cup_h / 2])
        rotate([90, 0, 0])
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_tube_r);
}
mediumnot run
high (default) success
high
23.6s · 220/1698t · $0.0871
SCAD (34 lines)
// マグカップ
$fn = 100;

// パラメータ
outer_d       = 80;   // 外径
cup_h         = 100;  // 高さ
wall_t        = 4;    // 側面の肉厚
bottom_t      = 6;    // 底面の厚み
handle_r      = 12;   // 取手リングの半径(中心円の半径)
handle_tube_r = 5;    // 取手の太さ(断面半径)

// 取手(トーラス)
module handle() {
    // カップ外壁に少し食い込ませて接合し、外側へ大きく張り出す
    translate([outer_d/2 + 8, 0, cup_h/2])
        rotate([90, 0, 0])
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_tube_r);
}

// マグカップ本体
difference() {
    union() {
        // カップ外形
        cylinder(h = cup_h, d = outer_d);
        // 取手
        handle();
    }
    // 内側をくり抜く(底面厚 6mm を残す)
    // 取手がカップ内部にはみ出した部分もここで除去される
    translate([0, 0, bottom_t])
        cylinder(h = cup_h, d = outer_d - 2 * wall_t);
}
max success
max
81.8s · 220/6494t · $0.3269
SCAD (42 lines)
// =====================================
//  マグカップ (OpenSCAD)
// =====================================

$fn = 120;            // 円の滑らかさ

// ---- カップ本体のパラメータ ----
outer_d  = 80;        // 外径 [mm]
cup_h    = 100;       // 高さ [mm]
wall_t   = 4;         // 側面の肉厚 [mm]
bottom_t = 6;         // 底面の厚み [mm]

// ---- 取手のパラメータ ----
handle_r      = 12;                         // リング(取手)の半径 [mm]
handle_tube_r = 5;                          // リング断面(握り)の半径 [mm]
handle_z      = cup_h / 2;                  // 取手の中心高さ(カップ中央)
handle_cx     = outer_d/2 + handle_r - 2;   // リング中心のX位置(壁に少し食い込ませて接合)

// ---- トーラス(リング)モジュール ----
// R: リング中心円の半径, r: 断面円の半径
module torus(R, r) {
    rotate_extrude(convexity = 10)
        translate([R, 0, 0])
            circle(r = r);
}

// ---- マグカップ全体 ----
difference() {
    union() {
        // カップの外形(円柱)
        cylinder(d = outer_d, h = cup_h);

        // 取手:縦向きのリングを側面外側に接合
        translate([handle_cx, 0, handle_z])
            rotate([90, 0, 0])              // リングを垂直(XZ平面)に立てる
                torus(handle_r, handle_tube_r);
    }

    // 内側のくり抜き(底を bottom_t 残し、上面まで貫通)
    translate([0, 0, bottom_t])
        cylinder(d = outer_d - 2 * wall_t, h = cup_h);
}
xhigh success
xhigh
35.0s · 220/2680t · $0.1362
SCAD (46 lines)
// マグカップ
// 外径 80mm、高さ 100mm、肉厚 4mm、底面厚み 6mm
// 半径 12mm のリング状取手付き

$fn = 120;

outer_d  = 80;            // 外径
outer_r  = outer_d / 2;   // 外半径 (40mm)
height   = 100;           // 高さ
wall     = 4;             // 側面の肉厚
bottom   = 6;             // 底面の厚み

handle_r = 12;            // 取手リングの半径
handle_t = 4;             // 取手の断面(パイプ)半径
handle_z = height / 2;    // 取手の取り付け高さ(中央)
handle_cx = outer_r + handle_r - 2;  // 取手中心の X 位置(壁に少し食い込ませる)

// カップ本体(外形)
module cup_body() {
    cylinder(h = height, r = outer_r);
}

// 内側のくり抜き(飲み物が入る空間)
module cavity() {
    translate([0, 0, bottom])
        cylinder(h = height - bottom + 1, r = outer_r - wall);
}

// リング状の取手(トーラス)
module handle() {
    translate([handle_cx, 0, handle_z])
        rotate([90, 0, 0])  // リングを垂直に立てる
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_t);
}

// 組み立て:本体と取手を結合した後で内側をくり抜く
// (取手が内部空間に飛び出さないようにするため)
difference() {
    union() {
        cup_body();
        handle();
    }
    cavity();
}

variant: thinking

offnot run
adaptive (default) success
adaptive
35.0s · 220/2680t · $0.1362
SCAD (46 lines)
// マグカップ
// 外径 80mm、高さ 100mm、肉厚 4mm、底面厚み 6mm
// 半径 12mm のリング状取手付き

$fn = 120;

outer_d  = 80;            // 外径
outer_r  = outer_d / 2;   // 外半径 (40mm)
height   = 100;           // 高さ
wall     = 4;             // 側面の肉厚
bottom   = 6;             // 底面の厚み

handle_r = 12;            // 取手リングの半径
handle_t = 4;             // 取手の断面(パイプ)半径
handle_z = height / 2;    // 取手の取り付け高さ(中央)
handle_cx = outer_r + handle_r - 2;  // 取手中心の X 位置(壁に少し食い込ませる)

// カップ本体(外形)
module cup_body() {
    cylinder(h = height, r = outer_r);
}

// 内側のくり抜き(飲み物が入る空間)
module cavity() {
    translate([0, 0, bottom])
        cylinder(h = height - bottom + 1, r = outer_r - wall);
}

// リング状の取手(トーラス)
module handle() {
    translate([handle_cx, 0, handle_z])
        rotate([90, 0, 0])  // リングを垂直に立てる
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_t);
}

// 組み立て:本体と取手を結合した後で内側をくり抜く
// (取手が内部空間に飛び出さないようにするため)
difference() {
    union() {
        cup_body();
        handle();
    }
    cavity();
}
dynamicnot run

iteration: iter-png

i1 success
iter 1
17.2s · 1438/1171t · $0.0729
diff vs bare: +0/-0
  // マグカップ
  $fn = 100;
  
  // パラメータ
  outer_d       = 80;   // 外径
  cup_h         = 100;  // 高さ
  wall_t        = 4;    // 側面の肉厚
  bottom_t      = 6;    // 底面の厚み
  handle_r      = 12;   // 取手リングの半径(中心円の半径)
  handle_tube_r = 5;    // 取手の太さ(断面半径)
  
  // 取手(トーラス)
  module handle() {
      // カップ外壁に少し食い込ませて接合し、外側へ大きく張り出す
      translate([outer_d/2 + 8, 0, cup_h/2])
          rotate([90, 0, 0])
              rotate_extrude(angle = 360)
                  translate([handle_r, 0, 0])
                      circle(r = handle_tube_r);
  }
  
  // マグカップ本体
  difference() {
      union() {
          // カップ外形
          cylinder(h = cup_h, d = outer_d);
          // 取手
          handle();
      }
      // 内側をくり抜く(底面厚 6mm を残す)
      // 取手がカップ内部にはみ出した部分もここで除去される
      translate([0, 0, bottom_t])
          cylinder(h = cup_h, d = outer_d - 2 * wall_t);
  }
SCAD (34 lines)
// マグカップ
$fn = 100;

// パラメータ
outer_d       = 80;   // 外径
cup_h         = 100;  // 高さ
wall_t        = 4;    // 側面の肉厚
bottom_t      = 6;    // 底面の厚み
handle_r      = 12;   // 取手リングの半径(中心円の半径)
handle_tube_r = 5;    // 取手の太さ(断面半径)

// 取手(トーラス)
module handle() {
    // カップ外壁に少し食い込ませて接合し、外側へ大きく張り出す
    translate([outer_d/2 + 8, 0, cup_h/2])
        rotate([90, 0, 0])
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_tube_r);
}

// マグカップ本体
difference() {
    union() {
        // カップ外形
        cylinder(h = cup_h, d = outer_d);
        // 取手
        handle();
    }
    // 内側をくり抜く(底面厚 6mm を残す)
    // 取手がカップ内部にはみ出した部分もここで除去される
    translate([0, 0, bottom_t])
        cylinder(h = cup_h, d = outer_d - 2 * wall_t);
}
i2 success
iter 2
14.2s · 1438/814t · $0.0551
diff vs i1: +4/-3
  // マグカップ
  $fn = 100;
  
  // パラメータ
  outer_d       = 80;   // 外径
  cup_h         = 100;  // 高さ
  wall_t        = 4;    // 側面の肉厚
  bottom_t      = 6;    // 底面の厚み
  handle_r      = 12;   // 取手リングの半径(中心円の半径)
- handle_tube_r = 5;    // 取手の太さ(断面半径)
+ handle_tube_r = 4;    // 取手の太さ(断面半径)
  
  // 取手(トーラス)
  module handle() {
-     // カップ外壁に少し食い込ませて接合し、外側へ大きく張り出す
-     translate([outer_d/2 + 8, 0, cup_h/2])
+     // カップ外壁にしっかり食い込ませて接合し、
+     // 外側へ大きく張り出して指が通る穴を確保する
+     translate([outer_d/2 + handle_r - 2, 0, cup_h/2])
          rotate([90, 0, 0])
              rotate_extrude(angle = 360)
                  translate([handle_r, 0, 0])
                      circle(r = handle_tube_r);
  }
  
  // マグカップ本体
  difference() {
      union() {
          // カップ外形
          cylinder(h = cup_h, d = outer_d);
          // 取手
          handle();
      }
      // 内側をくり抜く(底面厚 6mm を残す)
      // 取手がカップ内部にはみ出した部分もここで除去される
      translate([0, 0, bottom_t])
          cylinder(h = cup_h, d = outer_d - 2 * wall_t);
  }
SCAD (35 lines)
// マグカップ
$fn = 100;

// パラメータ
outer_d       = 80;   // 外径
cup_h         = 100;  // 高さ
wall_t        = 4;    // 側面の肉厚
bottom_t      = 6;    // 底面の厚み
handle_r      = 12;   // 取手リングの半径(中心円の半径)
handle_tube_r = 4;    // 取手の太さ(断面半径)

// 取手(トーラス)
module handle() {
    // カップ外壁にしっかり食い込ませて接合し、
    // 外側へ大きく張り出して指が通る穴を確保する
    translate([outer_d/2 + handle_r - 2, 0, cup_h/2])
        rotate([90, 0, 0])
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_tube_r);
}

// マグカップ本体
difference() {
    union() {
        // カップ外形
        cylinder(h = cup_h, d = outer_d);
        // 取手
        handle();
    }
    // 内側をくり抜く(底面厚 6mm を残す)
    // 取手がカップ内部にはみ出した部分もここで除去される
    translate([0, 0, bottom_t])
        cylinder(h = cup_h, d = outer_d - 2 * wall_t);
}
i3 success
iter 3
23.8s · 1459/1536t · $0.0914
diff vs i2: +0/-0
  // マグカップ
  $fn = 100;
  
  // パラメータ
  outer_d       = 80;   // 外径
  cup_h         = 100;  // 高さ
  wall_t        = 4;    // 側面の肉厚
  bottom_t      = 6;    // 底面の厚み
  handle_r      = 12;   // 取手リングの半径(中心円の半径)
  handle_tube_r = 4;    // 取手の太さ(断面半径)
  
  // 取手(トーラス)
  module handle() {
      // カップ外壁にしっかり食い込ませて接合し、
      // 外側へ大きく張り出して指が通る穴を確保する
      translate([outer_d/2 + handle_r - 2, 0, cup_h/2])
          rotate([90, 0, 0])
              rotate_extrude(angle = 360)
                  translate([handle_r, 0, 0])
                      circle(r = handle_tube_r);
  }
  
  // マグカップ本体
  difference() {
      union() {
          // カップ外形
          cylinder(h = cup_h, d = outer_d);
          // 取手
          handle();
      }
      // 内側をくり抜く(底面厚 6mm を残す)
      // 取手がカップ内部にはみ出した部分もここで除去される
      translate([0, 0, bottom_t])
          cylinder(h = cup_h, d = outer_d - 2 * wall_t);
  }
SCAD (35 lines)
// マグカップ
$fn = 100;

// パラメータ
outer_d       = 80;   // 外径
cup_h         = 100;  // 高さ
wall_t        = 4;    // 側面の肉厚
bottom_t      = 6;    // 底面の厚み
handle_r      = 12;   // 取手リングの半径(中心円の半径)
handle_tube_r = 4;    // 取手の太さ(断面半径)

// 取手(トーラス)
module handle() {
    // カップ外壁にしっかり食い込ませて接合し、
    // 外側へ大きく張り出して指が通る穴を確保する
    translate([outer_d/2 + handle_r - 2, 0, cup_h/2])
        rotate([90, 0, 0])
            rotate_extrude(angle = 360)
                translate([handle_r, 0, 0])
                    circle(r = handle_tube_r);
}

// マグカップ本体
difference() {
    union() {
        // カップ外形
        cylinder(h = cup_h, d = outer_d);
        // 取手
        handle();
    }
    // 内側をくり抜く(底面厚 6mm を残す)
    // 取手がカップ内部にはみ出した部分もここで除去される
    translate([0, 0, bottom_t])
        cylinder(h = cup_h, d = outer_d - 2 * wall_t);
}