vibe-openscad

tier-2-l-bracket / claude-opus-4-20250514

3 run / 累計 27.3s / 累計 $0.1331

claude opus 4 2025-05-14 bare

bare (provider default effort)

run detail →
render
bare render of tier-2-l-bracket
loading STL…
success 9.4s · 361/447t · $0.0389
SCAD (46 lines)
// L-bracket parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

// Countersunk hole parameters
hole_dia = 4.5;
countersink_dia = 8;
countersink_depth = 2;
hole_offset = 10;

// Main L-bracket
difference() {
    union() {
        // Horizontal flange
        cube([width, depth, thickness]);
        
        // Vertical flange
        cube([width, thickness, height]);
    }
    
    // Horizontal flange holes
    for (x = [hole_offset, width - hole_offset]) {
        translate([x, depth/2, 0]) {
            // Through hole
            cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
            // Countersink
            translate([0, 0, thickness - countersink_depth])
                cylinder(h = countersink_depth + 0.1, d1 = hole_dia, d2 = countersink_dia, $fn = 32);
        }
    }
    
    // Vertical flange holes
    for (x = [hole_offset, width - hole_offset]) {
        translate([x, -0.05, height/2]) {
            rotate([-90, 0, 0]) {
                // Through hole
                cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
                // Countersink
                translate([0, 0, thickness - countersink_depth])
                    cylinder(h = countersink_depth + 0.1, d1 = hole_dia, d2 = countersink_dia, $fn = 32);
            }
        }
    }
}
パラメータ (8)
スライダを動かすと openscad-wasm で再レンダリング

prompt

OpenSCAD で、L 字に折れた金具(L-bracket)を作ってください。

形状:
- 水平面と垂直面の 2 つのフランジが直角に繋がっている
- 水平面は 50mm × 40mm(幅 × 奥行き)
- 垂直面は 50mm × 40mm(幅 × 高さ)
- 板厚はどちらも 3mm
- 内側コーナーが原点になるように配置(水平面は +Y 方向、垂直面は +Z 方向に伸びる)

皿穴(countersunk holes):
- 各面に 2 個ずつ、合計 4 個
- M4 ねじ用(貫通穴 Φ4.5mm + 皿座面 Φ8mm × 深さ 2mm)
- 各面の中心線上で、面の縁から 10mm 内側、左右対称に 2 個並べる
- 皿座面は外側(ボルト頭が当たる側)に向ける

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

variant: thinking

off (default) success
off
9.4s · 361/447t · $0.0389
SCAD (46 lines)
// L-bracket parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

// Countersunk hole parameters
hole_dia = 4.5;
countersink_dia = 8;
countersink_depth = 2;
hole_offset = 10;

// Main L-bracket
difference() {
    union() {
        // Horizontal flange
        cube([width, depth, thickness]);
        
        // Vertical flange
        cube([width, thickness, height]);
    }
    
    // Horizontal flange holes
    for (x = [hole_offset, width - hole_offset]) {
        translate([x, depth/2, 0]) {
            // Through hole
            cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
            // Countersink
            translate([0, 0, thickness - countersink_depth])
                cylinder(h = countersink_depth + 0.1, d1 = hole_dia, d2 = countersink_dia, $fn = 32);
        }
    }
    
    // Vertical flange holes
    for (x = [hole_offset, width - hole_offset]) {
        translate([x, -0.05, height/2]) {
            rotate([-90, 0, 0]) {
                // Through hole
                cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
                // Countersink
                translate([0, 0, thickness - countersink_depth])
                    cylinder(h = countersink_depth + 0.1, d1 = hole_dia, d2 = countersink_dia, $fn = 32);
            }
        }
    }
}
adaptivenot run
dynamicnot run

iteration: iter-png

i1 success
iter 1
8.6s · 1564/423t · $0.0552
diff vs bare: +7/-9
  // L-bracket parameters
  width = 50;
  depth = 40;
  height = 40;
  thickness = 3;
  
  // Countersunk hole parameters
  hole_dia = 4.5;
  countersink_dia = 8;
  countersink_depth = 2;
  hole_offset = 10;
  
  // Main L-bracket
  difference() {
      union() {
          // Horizontal flange
          cube([width, depth, thickness]);
          
          // Vertical flange
          cube([width, thickness, height]);
      }
      
      // Horizontal flange holes
      for (x = [hole_offset, width - hole_offset]) {
-         translate([x, depth/2, 0]) {
+         translate([x, depth/2, -0.05]) {
              // Through hole
              cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
-             // Countersink
-             translate([0, 0, thickness - countersink_depth])
-                 cylinder(h = countersink_depth + 0.1, d1 = hole_dia, d2 = countersink_dia, $fn = 32);
+             // Countersink (from bottom)
+             cylinder(h = countersink_depth + 0.05, d1 = countersink_dia, d2 = hole_dia, $fn = 32);
          }
      }
      
      // Vertical flange holes
      for (x = [hole_offset, width - hole_offset]) {
-         translate([x, -0.05, height/2]) {
-             rotate([-90, 0, 0]) {
+         translate([x, thickness + 0.05, height/2]) {
+             rotate([90, 0, 0]) {
                  // Through hole
                  cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
-                 // Countersink
-                 translate([0, 0, thickness - countersink_depth])
-                     cylinder(h = countersink_depth + 0.1, d1 = hole_dia, d2 = countersink_dia, $fn = 32);
+                 // Countersink (from front)
+                 cylinder(h = countersink_depth + 0.05, d1 = countersink_dia, d2 = hole_dia, $fn = 32);
              }
          }
      }
  }
SCAD (44 lines)
// L-bracket parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

// Countersunk hole parameters
hole_dia = 4.5;
countersink_dia = 8;
countersink_depth = 2;
hole_offset = 10;

// Main L-bracket
difference() {
    union() {
        // Horizontal flange
        cube([width, depth, thickness]);
        
        // Vertical flange
        cube([width, thickness, height]);
    }
    
    // Horizontal flange holes
    for (x = [hole_offset, width - hole_offset]) {
        translate([x, depth/2, -0.05]) {
            // Through hole
            cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
            // Countersink (from bottom)
            cylinder(h = countersink_depth + 0.05, d1 = countersink_dia, d2 = hole_dia, $fn = 32);
        }
    }
    
    // Vertical flange holes
    for (x = [hole_offset, width - hole_offset]) {
        translate([x, thickness + 0.05, height/2]) {
            rotate([90, 0, 0]) {
                // Through hole
                cylinder(h = thickness + 0.1, d = hole_dia, $fn = 32);
                // Countersink (from front)
                cylinder(h = countersink_depth + 0.05, d1 = countersink_dia, d2 = hole_dia, $fn = 32);
            }
        }
    }
}
i2not run
i3not run