vibe-openscad

tier-2-l-bracket / claude-opus-4-1-20250805

5 run / 累計 40.8s / 累計 $0.2325

claude opus 4.1 2025-08-05 bare

bare (provider default effort)

run detail →
render
bare render of tier-2-l-bracket
loading STL…
success 8.6s · 361/408t · $0.0360
SCAD (44 lines)
// L-bracket with countersunk holes

module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
    translate([0, 0, -total_depth]) {
        cylinder(h = total_depth, d = through_dia, $fn = 32);
    }
    translate([0, 0, -counter_depth]) {
        cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
    }
}

module l_bracket() {
    difference() {
        union() {
            // Horizontal flange
            cube([50, 40, 3]);
            
            // Vertical flange
            cube([50, 3, 40]);
        }
        
        // Horizontal flange holes
        translate([15, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        translate([35, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        
        // Vertical flange holes
        translate([15, 0, 20]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
        translate([35, 0, 20]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
    }
}

l_bracket();

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
8.6s · 361/408t · $0.0360
SCAD (44 lines)
// L-bracket with countersunk holes

module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
    translate([0, 0, -total_depth]) {
        cylinder(h = total_depth, d = through_dia, $fn = 32);
    }
    translate([0, 0, -counter_depth]) {
        cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
    }
}

module l_bracket() {
    difference() {
        union() {
            // Horizontal flange
            cube([50, 40, 3]);
            
            // Vertical flange
            cube([50, 3, 40]);
        }
        
        // Horizontal flange holes
        translate([15, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        translate([35, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        
        // Vertical flange holes
        translate([15, 0, 20]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
        translate([35, 0, 20]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
    }
}

l_bracket();
adaptivenot run
dynamicnot run

iteration: iter-png

i1 success
iter 1
7.9s · 1525/408t · $0.0535
diff vs bare: +3/-3
  // L-bracket with countersunk holes
  
  module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
      translate([0, 0, -total_depth]) {
          cylinder(h = total_depth, d = through_dia, $fn = 32);
      }
      translate([0, 0, -counter_depth]) {
          cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
      }
  }
  
  module l_bracket() {
      difference() {
          union() {
              // Horizontal flange
              cube([50, 40, 3]);
              
              // Vertical flange
-             cube([50, 3, 40]);
+             cube([50, 3, 43]);
          }
          
          // Horizontal flange holes
          translate([15, 20, 3]) {
              countersunk_hole(4.5, 8, 2, 3);
          }
          translate([35, 20, 3]) {
              countersunk_hole(4.5, 8, 2, 3);
          }
          
          // Vertical flange holes
-         translate([15, 0, 20]) {
+         translate([15, 0, 23]) {
              rotate([-90, 0, 0]) {
                  countersunk_hole(4.5, 8, 2, 3);
              }
          }
-         translate([35, 0, 20]) {
+         translate([35, 0, 23]) {
              rotate([-90, 0, 0]) {
                  countersunk_hole(4.5, 8, 2, 3);
              }
          }
      }
  }
  
  l_bracket();
SCAD (44 lines)
// L-bracket with countersunk holes

module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
    translate([0, 0, -total_depth]) {
        cylinder(h = total_depth, d = through_dia, $fn = 32);
    }
    translate([0, 0, -counter_depth]) {
        cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
    }
}

module l_bracket() {
    difference() {
        union() {
            // Horizontal flange
            cube([50, 40, 3]);
            
            // Vertical flange
            cube([50, 3, 43]);
        }
        
        // Horizontal flange holes
        translate([15, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        translate([35, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        
        // Vertical flange holes
        translate([15, 0, 23]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
        translate([35, 0, 23]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
    }
}

l_bracket();
i2 success
iter 2
7.8s · 1525/408t · $0.0535
diff vs i1: +3/-3
  // L-bracket with countersunk holes
  
  module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
      translate([0, 0, -total_depth]) {
          cylinder(h = total_depth, d = through_dia, $fn = 32);
      }
      translate([0, 0, -counter_depth]) {
          cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
      }
  }
  
  module l_bracket() {
      difference() {
          union() {
              // Horizontal flange
              cube([50, 40, 3]);
              
              // Vertical flange
-             cube([50, 3, 43]);
+             cube([50, 3, 40]);
          }
          
          // Horizontal flange holes
          translate([15, 20, 3]) {
              countersunk_hole(4.5, 8, 2, 3);
          }
          translate([35, 20, 3]) {
              countersunk_hole(4.5, 8, 2, 3);
          }
          
          // Vertical flange holes
-         translate([15, 0, 23]) {
+         translate([15, 0, 20]) {
              rotate([-90, 0, 0]) {
                  countersunk_hole(4.5, 8, 2, 3);
              }
          }
-         translate([35, 0, 23]) {
+         translate([35, 0, 20]) {
              rotate([-90, 0, 0]) {
                  countersunk_hole(4.5, 8, 2, 3);
              }
          }
      }
  }
  
  l_bracket();
SCAD (44 lines)
// L-bracket with countersunk holes

module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
    translate([0, 0, -total_depth]) {
        cylinder(h = total_depth, d = through_dia, $fn = 32);
    }
    translate([0, 0, -counter_depth]) {
        cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
    }
}

module l_bracket() {
    difference() {
        union() {
            // Horizontal flange
            cube([50, 40, 3]);
            
            // Vertical flange
            cube([50, 3, 40]);
        }
        
        // Horizontal flange holes
        translate([15, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        translate([35, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        
        // Vertical flange holes
        translate([15, 0, 20]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
        translate([35, 0, 20]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
    }
}

l_bracket();
i3 success
iter 3
7.8s · 1525/408t · $0.0535
diff vs i2: +3/-3
  // L-bracket with countersunk holes
  
  module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
      translate([0, 0, -total_depth]) {
          cylinder(h = total_depth, d = through_dia, $fn = 32);
      }
      translate([0, 0, -counter_depth]) {
          cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
      }
  }
  
  module l_bracket() {
      difference() {
          union() {
              // Horizontal flange
              cube([50, 40, 3]);
              
              // Vertical flange
-             cube([50, 3, 40]);
+             cube([50, 3, 43]);
          }
          
          // Horizontal flange holes
          translate([15, 20, 3]) {
              countersunk_hole(4.5, 8, 2, 3);
          }
          translate([35, 20, 3]) {
              countersunk_hole(4.5, 8, 2, 3);
          }
          
          // Vertical flange holes
-         translate([15, 0, 20]) {
+         translate([15, 0, 23]) {
              rotate([-90, 0, 0]) {
                  countersunk_hole(4.5, 8, 2, 3);
              }
          }
-         translate([35, 0, 20]) {
+         translate([35, 0, 23]) {
              rotate([-90, 0, 0]) {
                  countersunk_hole(4.5, 8, 2, 3);
              }
          }
      }
  }
  
  l_bracket();
SCAD (44 lines)
// L-bracket with countersunk holes

module countersunk_hole(through_dia, counter_dia, counter_depth, total_depth) {
    translate([0, 0, -total_depth]) {
        cylinder(h = total_depth, d = through_dia, $fn = 32);
    }
    translate([0, 0, -counter_depth]) {
        cylinder(h = counter_depth, d1 = counter_dia, d2 = through_dia, $fn = 32);
    }
}

module l_bracket() {
    difference() {
        union() {
            // Horizontal flange
            cube([50, 40, 3]);
            
            // Vertical flange
            cube([50, 3, 43]);
        }
        
        // Horizontal flange holes
        translate([15, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        translate([35, 20, 3]) {
            countersunk_hole(4.5, 8, 2, 3);
        }
        
        // Vertical flange holes
        translate([15, 0, 23]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
        translate([35, 0, 23]) {
            rotate([-90, 0, 0]) {
                countersunk_hole(4.5, 8, 2, 3);
            }
        }
    }
}

l_bracket();