vibe-openscad

bare-low/gpt-5-mini / tier-2-hex-bolt

success tier 2

bare (gpt 5 mini)

render
bare render of tier-2-hex-bolt
loading STL…
success 15.3s · 200/895t · $0.0018
SCAD (32 lines)
// M8 hex bolt (simplified: no threads, cylindrical shank)
// Head: hexagonal prism, across-flats = 13 mm, height = 5.3 mm
// Shank: cylinder, diameter = 8 mm, length = 30 mm
// Head bottom at z = 0, shank extends to z < 0, central axis along +Z

$fn = 64; // smooth cylinder

module hex_head(across_flats = 13, height = 5.3) {
    // For a regular hexagon: across_flats = R * sqrt(3)  => circumradius R = across_flats / sqrt(3)
    R = across_flats / sqrt(3);
    // Create a 6-sided regular polygon with circumradius R, centered at origin
    linear_extrude(height = height, center = false, convexity = 10)
        polygon(points = [ for(i = [0:5]) let(a = i*360/6) [ R*cos(a), R*sin(a) ] ]);
}

module shank(diameter = 8, length = 30) {
    // Cylinder with top at z = 0, extending to negative z
    translate([0,0,-length]) // move base to z = -length
        translate([0,0,0]) // ensures top at z=0 after cylinder creation
            cylinder(h = length, d = diameter, center = false);
}

// Assemble: head from z=0 up, shank from z=0 down
union() {
    // Head: bottom at z = 0
    translate([0,0,0]) hex_head(13, 5.3);
    // Shank: top at z = 0, extends to z = -30
    shank(8, 30);
}

// Optional: create a module and call it (already assembled above)
// bolt();

meta

runIdbare-low_gpt-5-mini-ce8fd4551ed7-2026-04-28T18-49-39-814Z
matrixIdbare-low/gpt-5-mini
signaturece8fd4551ed7f423…
provideropenai
modelgpt-5-mini-2025-08-07
harnessbare
statussuccess
duration15.26s (wallclock: load + prompt eval + generation + network)
tokens200 in / 895 out
wallclock tok/s58.7 tok/s (end-to-end)
cost$0.0018
createdAt2026-04-28T18:49:39.814Z
gitCommit781e6c683dda
openscadOpenSCAD version 2026.04.27

prompt

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

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

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