vibe-openscad

tier-2-hex-bolt / gpt-5.1-codex-max

5 run / 累計 73.9s / 累計 $0.1223

openai gpt 5.1 codex max bare

bare (provider default effort)

run detail →
render
bare render of tier-2-hex-bolt
loading STL…
success 29.0s · 200/4563t · $0.0505
SCAD (16 lines)
// Parameters
head_across = 13;    // across-flats distance for hex head (mm)
head_height = 5.3;   // head height (mm)
shank_d    = 8;      // shank diameter (mm)
shank_len  = 30;     // shank length (mm)

// Compute circumscribed diameter for hexagon to achieve desired across-flats
head_d = head_across * 2 / sqrt(3);

union() {
    // Hex head, from z=0 to z=head_height
    cylinder(h = head_height, d = head_d, $fn = 6);
    // Shank, from z=-shank_len to z=0
    translate([0, 0, -shank_len])
        cylinder(h = shank_len, d = shank_d, $fn = 64);
}
パラメータ (4)
スライダを動かすと openscad-wasm で再レンダリング

prompt

OpenSCAD で、規格に準じた M8 サイズの六角ボルトを作ってください。
ねじ山自体は省略してよく、円柱のシャンクで構いません。

寸法は以下に従ってください:
- 頭部は六角柱で、対辺距離(across-flats)13mm、高さ 5.3mm
- シャンク(軸部)は直径 8mm、長さ 30mm の円柱
- ボルト全体の中心軸は +Z 軸方向
- 頭部の底面が原点(z=0)に来るように配置し、シャンクは z<0 側へ伸ばす

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

variant: effort

lownot run
medium (default) success
medium
29.0s · 200/4563t · $0.0505
SCAD (16 lines)
// Parameters
head_across = 13;    // across-flats distance for hex head (mm)
head_height = 5.3;   // head height (mm)
shank_d    = 8;      // shank diameter (mm)
shank_len  = 30;     // shank length (mm)

// Compute circumscribed diameter for hexagon to achieve desired across-flats
head_d = head_across * 2 / sqrt(3);

union() {
    // Hex head, from z=0 to z=head_height
    cylinder(h = head_height, d = head_d, $fn = 6);
    // Shank, from z=-shank_len to z=0
    translate([0, 0, -shank_len])
        cylinder(h = shank_len, d = shank_d, $fn = 64);
}
highnot run
maxnot run
xhighnot run

iteration: iter-png

i1 success
iter 1
4.6s · 1116/396t · $0.0059
diff vs bare: +0/-0
  // Parameters
  head_across = 13;    // across-flats distance for hex head (mm)
  head_height = 5.3;   // head height (mm)
  shank_d    = 8;      // shank diameter (mm)
  shank_len  = 30;     // shank length (mm)
  
  // Compute circumscribed diameter for hexagon to achieve desired across-flats
  head_d = head_across * 2 / sqrt(3);
  
  union() {
      // Hex head, from z=0 to z=head_height
      cylinder(h = head_height, d = head_d, $fn = 6);
      // Shank, from z=-shank_len to z=0
      translate([0, 0, -shank_len])
          cylinder(h = shank_len, d = shank_d, $fn = 64);
  }
SCAD (16 lines)
// Parameters
head_across = 13;    // across-flats distance for hex head (mm)
head_height = 5.3;   // head height (mm)
shank_d    = 8;      // shank diameter (mm)
shank_len  = 30;     // shank length (mm)

// Compute circumscribed diameter for hexagon to achieve desired across-flats
head_d = head_across * 2 / sqrt(3);

union() {
    // Hex head, from z=0 to z=head_height
    cylinder(h = head_height, d = head_d, $fn = 6);
    // Shank, from z=-shank_len to z=0
    translate([0, 0, -shank_len])
        cylinder(h = shank_len, d = shank_d, $fn = 64);
}
i2 success
iter 2
6.3s · 1116/668t · $0.0089
diff vs i1: +0/-0
  // Parameters
  head_across = 13;    // across-flats distance for hex head (mm)
  head_height = 5.3;   // head height (mm)
  shank_d    = 8;      // shank diameter (mm)
  shank_len  = 30;     // shank length (mm)
  
  // Compute circumscribed diameter for hexagon to achieve desired across-flats
  head_d = head_across * 2 / sqrt(3);
  
  union() {
      // Hex head, from z=0 to z=head_height
      cylinder(h = head_height, d = head_d, $fn = 6);
      // Shank, from z=-shank_len to z=0
      translate([0, 0, -shank_len])
          cylinder(h = shank_len, d = shank_d, $fn = 64);
  }
SCAD (16 lines)
// Parameters
head_across = 13;    // across-flats distance for hex head (mm)
head_height = 5.3;   // head height (mm)
shank_d    = 8;      // shank diameter (mm)
shank_len  = 30;     // shank length (mm)

// Compute circumscribed diameter for hexagon to achieve desired across-flats
head_d = head_across * 2 / sqrt(3);

union() {
    // Hex head, from z=0 to z=head_height
    cylinder(h = head_height, d = head_d, $fn = 6);
    // Shank, from z=-shank_len to z=0
    translate([0, 0, -shank_len])
        cylinder(h = shank_len, d = shank_d, $fn = 64);
}
i3 success
iter 3
4.9s · 1116/454t · $0.0066
diff vs i2: +0/-0
  // Parameters
  head_across = 13;    // across-flats distance for hex head (mm)
  head_height = 5.3;   // head height (mm)
  shank_d    = 8;      // shank diameter (mm)
  shank_len  = 30;     // shank length (mm)
  
  // Compute circumscribed diameter for hexagon to achieve desired across-flats
  head_d = head_across * 2 / sqrt(3);
  
  union() {
      // Hex head, from z=0 to z=head_height
      cylinder(h = head_height, d = head_d, $fn = 6);
      // Shank, from z=-shank_len to z=0
      translate([0, 0, -shank_len])
          cylinder(h = shank_len, d = shank_d, $fn = 64);
  }
SCAD (16 lines)
// Parameters
head_across = 13;    // across-flats distance for hex head (mm)
head_height = 5.3;   // head height (mm)
shank_d    = 8;      // shank diameter (mm)
shank_len  = 30;     // shank length (mm)

// Compute circumscribed diameter for hexagon to achieve desired across-flats
head_d = head_across * 2 / sqrt(3);

union() {
    // Hex head, from z=0 to z=head_height
    cylinder(h = head_height, d = head_d, $fn = 6);
    // Shank, from z=-shank_len to z=0
    translate([0, 0, -shank_len])
        cylinder(h = shank_len, d = shank_d, $fn = 64);
}