vibe-openscad

tier-2-l-bracket / gpt-5.1-codex-max

5 run / 累計 248.9s / 累計 $0.2787

openai gpt 5.1 codex max bare

bare (provider default effort)

run detail →
render
bare render of tier-2-l-bracket
loading STL…
success 55.3s · 294/5825t · $0.0645
SCAD (36 lines)
// Parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_d = 4.5;
cs_d = 8;
cs_depth = 2;

difference() {
    union() {
        // Horizontal flange (+Y direction, thickness in -Z)
        translate([0, 0, -thickness])
            cube([width, depth, thickness], center = false);
        // Vertical flange (+Z direction, thickness in -Y)
        translate([0, -thickness, 0])
            cube([width, thickness, height], center = false);
    }
    // Countersunk holes on horizontal flange
    for (ypos = [10, depth - 10]) {
        translate([width / 2, ypos, -5])
            cylinder(d = hole_d, h = 10, $fn = 64);
        translate([width / 2, ypos, -thickness])
            cylinder(d = cs_d, h = cs_depth, $fn = 64);
    }
    // Countersunk holes on vertical flange
    for (zpos = [10, height - 10]) {
        translate([width / 2, -5, zpos])
            rotate([-90, 0, 0])
                cylinder(d = hole_d, h = 10, $fn = 64);
        translate([width / 2, -thickness, zpos])
            rotate([-90, 0, 0])
                cylinder(d = cs_d, h = cs_depth, $fn = 64);
    }
}
パラメータ (7)
スライダを動かすと 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: effort

lownot run
medium (default) success
medium
55.3s · 294/5825t · $0.0645
SCAD (36 lines)
// Parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_d = 4.5;
cs_d = 8;
cs_depth = 2;

difference() {
    union() {
        // Horizontal flange (+Y direction, thickness in -Z)
        translate([0, 0, -thickness])
            cube([width, depth, thickness], center = false);
        // Vertical flange (+Z direction, thickness in -Y)
        translate([0, -thickness, 0])
            cube([width, thickness, height], center = false);
    }
    // Countersunk holes on horizontal flange
    for (ypos = [10, depth - 10]) {
        translate([width / 2, ypos, -5])
            cylinder(d = hole_d, h = 10, $fn = 64);
        translate([width / 2, ypos, -thickness])
            cylinder(d = cs_d, h = cs_depth, $fn = 64);
    }
    // Countersunk holes on vertical flange
    for (zpos = [10, height - 10]) {
        translate([width / 2, -5, zpos])
            rotate([-90, 0, 0])
                cylinder(d = hole_d, h = 10, $fn = 64);
        translate([width / 2, -thickness, zpos])
            rotate([-90, 0, 0])
                cylinder(d = cs_d, h = cs_depth, $fn = 64);
    }
}
highnot run
maxnot run
xhighnot run

iteration: iter-png

i1 success
iter 1
30.6s · 1361/2668t · $0.0313
diff vs bare: +18/-18
  // Parameters
  width = 50;
  depth = 40;
  height = 40;
  thickness = 3;
  
  hole_d = 4.5;
  cs_d = 8;
  cs_depth = 2;
  
+ $fn = 64;
+ 
  difference() {
      union() {
-         // Horizontal flange (+Y direction, thickness in -Z)
-         translate([0, 0, -thickness])
-             cube([width, depth, thickness], center = false);
-         // Vertical flange (+Z direction, thickness in -Y)
-         translate([0, -thickness, 0])
-             cube([width, thickness, height], center = false);
+         // Horizontal flange (+Y direction, thickness in +Z)
+         cube([width, depth, thickness], center = false);
+         // Vertical flange (+Z direction, thickness in +Y)
+         cube([width, thickness, height], center = false);
      }
-     // Countersunk holes on horizontal flange
+     // Countersunk holes on horizontal flange (outer face at z = thickness)
      for (ypos = [10, depth - 10]) {
-         translate([width / 2, ypos, -5])
-             cylinder(d = hole_d, h = 10, $fn = 64);
-         translate([width / 2, ypos, -thickness])
-             cylinder(d = cs_d, h = cs_depth, $fn = 64);
+         translate([width / 2, ypos, 0])
+             cylinder(d = hole_d, h = thickness + 2);
+         translate([width / 2, ypos, thickness - cs_depth])
+             cylinder(d = cs_d, h = cs_depth);
      }
-     // Countersunk holes on vertical flange
+     // Countersunk holes on vertical flange (outer face at y = thickness)
      for (zpos = [10, height - 10]) {
-         translate([width / 2, -5, zpos])
-             rotate([-90, 0, 0])
-                 cylinder(d = hole_d, h = 10, $fn = 64);
-         translate([width / 2, -thickness, zpos])
-             rotate([-90, 0, 0])
-                 cylinder(d = cs_d, h = cs_depth, $fn = 64);
+         translate([width / 2, thickness, zpos])
+             rotate([90, 0, 0])
+                 cylinder(d = hole_d, h = thickness + 2);
+         translate([width / 2, thickness, zpos])
+             rotate([90, 0, 0])
+                 cylinder(d = cs_d, h = cs_depth);
      }
  }
SCAD (36 lines)
// Parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_d = 4.5;
cs_d = 8;
cs_depth = 2;

$fn = 64;

difference() {
    union() {
        // Horizontal flange (+Y direction, thickness in +Z)
        cube([width, depth, thickness], center = false);
        // Vertical flange (+Z direction, thickness in +Y)
        cube([width, thickness, height], center = false);
    }
    // Countersunk holes on horizontal flange (outer face at z = thickness)
    for (ypos = [10, depth - 10]) {
        translate([width / 2, ypos, 0])
            cylinder(d = hole_d, h = thickness + 2);
        translate([width / 2, ypos, thickness - cs_depth])
            cylinder(d = cs_d, h = cs_depth);
    }
    // Countersunk holes on vertical flange (outer face at y = thickness)
    for (zpos = [10, height - 10]) {
        translate([width / 2, thickness, zpos])
            rotate([90, 0, 0])
                cylinder(d = hole_d, h = thickness + 2);
        translate([width / 2, thickness, zpos])
            rotate([90, 0, 0])
                cylinder(d = cs_d, h = cs_depth);
    }
}
i2 success
iter 2
73.6s · 1335/6603t · $0.0745
diff vs i1: +0/-0
  // Parameters
  width = 50;
  depth = 40;
  height = 40;
  thickness = 3;
  
  hole_d = 4.5;
  cs_d = 8;
  cs_depth = 2;
  
  $fn = 64;
  
  difference() {
      union() {
          // Horizontal flange (+Y direction, thickness in +Z)
          cube([width, depth, thickness], center = false);
          // Vertical flange (+Z direction, thickness in +Y)
          cube([width, thickness, height], center = false);
      }
      // Countersunk holes on horizontal flange (outer face at z = thickness)
      for (ypos = [10, depth - 10]) {
          translate([width / 2, ypos, 0])
              cylinder(d = hole_d, h = thickness + 2);
          translate([width / 2, ypos, thickness - cs_depth])
              cylinder(d = cs_d, h = cs_depth);
      }
      // Countersunk holes on vertical flange (outer face at y = thickness)
      for (zpos = [10, height - 10]) {
          translate([width / 2, thickness, zpos])
              rotate([90, 0, 0])
                  cylinder(d = hole_d, h = thickness + 2);
          translate([width / 2, thickness, zpos])
              rotate([90, 0, 0])
                  cylinder(d = cs_d, h = cs_depth);
      }
  }
SCAD (36 lines)
// Parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_d = 4.5;
cs_d = 8;
cs_depth = 2;

$fn = 64;

difference() {
    union() {
        // Horizontal flange (+Y direction, thickness in +Z)
        cube([width, depth, thickness], center = false);
        // Vertical flange (+Z direction, thickness in +Y)
        cube([width, thickness, height], center = false);
    }
    // Countersunk holes on horizontal flange (outer face at z = thickness)
    for (ypos = [10, depth - 10]) {
        translate([width / 2, ypos, 0])
            cylinder(d = hole_d, h = thickness + 2);
        translate([width / 2, ypos, thickness - cs_depth])
            cylinder(d = cs_d, h = cs_depth);
    }
    // Countersunk holes on vertical flange (outer face at y = thickness)
    for (zpos = [10, height - 10]) {
        translate([width / 2, thickness, zpos])
            rotate([90, 0, 0])
                cylinder(d = hole_d, h = thickness + 2);
        translate([width / 2, thickness, zpos])
            rotate([90, 0, 0])
                cylinder(d = cs_d, h = cs_depth);
    }
}
i3 success
iter 3
34.1s · 1335/3827t · $0.0440
diff vs i2: +0/-0
  // Parameters
  width = 50;
  depth = 40;
  height = 40;
  thickness = 3;
  
  hole_d = 4.5;
  cs_d = 8;
  cs_depth = 2;
  
  $fn = 64;
  
  difference() {
      union() {
          // Horizontal flange (+Y direction, thickness in +Z)
          cube([width, depth, thickness], center = false);
          // Vertical flange (+Z direction, thickness in +Y)
          cube([width, thickness, height], center = false);
      }
      // Countersunk holes on horizontal flange (outer face at z = thickness)
      for (ypos = [10, depth - 10]) {
          translate([width / 2, ypos, 0])
              cylinder(d = hole_d, h = thickness + 2);
          translate([width / 2, ypos, thickness - cs_depth])
              cylinder(d = cs_d, h = cs_depth);
      }
      // Countersunk holes on vertical flange (outer face at y = thickness)
      for (zpos = [10, height - 10]) {
          translate([width / 2, thickness, zpos])
              rotate([90, 0, 0])
                  cylinder(d = hole_d, h = thickness + 2);
          translate([width / 2, thickness, zpos])
              rotate([90, 0, 0])
                  cylinder(d = cs_d, h = cs_depth);
      }
  }
SCAD (36 lines)
// Parameters
width = 50;
depth = 40;
height = 40;
thickness = 3;

hole_d = 4.5;
cs_d = 8;
cs_depth = 2;

$fn = 64;

difference() {
    union() {
        // Horizontal flange (+Y direction, thickness in +Z)
        cube([width, depth, thickness], center = false);
        // Vertical flange (+Z direction, thickness in +Y)
        cube([width, thickness, height], center = false);
    }
    // Countersunk holes on horizontal flange (outer face at z = thickness)
    for (ypos = [10, depth - 10]) {
        translate([width / 2, ypos, 0])
            cylinder(d = hole_d, h = thickness + 2);
        translate([width / 2, ypos, thickness - cs_depth])
            cylinder(d = cs_d, h = cs_depth);
    }
    // Countersunk holes on vertical flange (outer face at y = thickness)
    for (zpos = [10, height - 10]) {
        translate([width / 2, thickness, zpos])
            rotate([90, 0, 0])
                cylinder(d = hole_d, h = thickness + 2);
        translate([width / 2, thickness, zpos])
            rotate([90, 0, 0])
                cylinder(d = cs_d, h = cs_depth);
    }
}