vibe-openscad

bare-think-off/gemini-2.5-flash-lite / tier-2-hex-bolt

success tier 2

bare (gemini 2.5 flash-lite)

render
bare render of tier-2-hex-bolt
loading STL…
success 6.4s · 173/443t · $0.0002
SCAD (44 lines)
// M8 Hex Bolt (shank only)

module bolt() {
    // Bolt head
    head_across_flats = 13;
    head_height = 5.3;

    // Shank
    shank_diameter = 8;
    shank_length = 30;

    // Hex head using hull and cylinders
    // The angle of rotation for each face is calculated
    // For a hexagon, 360 degrees / 6 faces = 60 degrees per face
    // We need to rotate by half of that to center the faces on the axes
    hex_radius = head_across_flats / 2;
    difference() {
        union() {
            // Create a cylinder for the top surface of the head
            cylinder(h = head_height, r = hex_radius, $fn = 6);
            // Create the hexagonal sides by rotating and hulling cylinders
            for (i = [0:5]) {
                rotate([0, 0, i * 60 + 30]) { // Rotate to center faces on axes
                    translate([hex_radius, 0, 0]) {
                        cylinder(h = head_height, r = 0.1, $fn = 6); // Tiny cylinder to define the edge
                    }
                }
            }
            // Create the base of the head using a cylinder
            cylinder(h = 0.1, r = hex_radius, $fn = 6); // Thin cylinder for the base
        }
        // Chamfer the top edge of the hex head slightly (optional but realistic)
        // You can adjust this or remove it if not needed.
        // For simplicity, we'll omit chamfering here to strictly follow the prompt.
    }


    // Shank
    translate([0, 0, -shank_length]) {
        cylinder(h = shank_length, d = shank_diameter);
    }
}

bolt();

meta

runIdbare-think-off_gemini-2.5-flash-lite-0ad0ebc4fe00-2026-04-28T18-47-26-680Z
matrixIdbare-think-off/gemini-2.5-flash-lite
signature0ad0ebc4fe00515e…
providergoogle
modelgemini-2.5-flash-lite
harnessbare
statussuccess
duration6.39s (wallclock: load + prompt eval + generation + network)
tokens173 in / 443 out
wallclock tok/s69.3 tok/s (end-to-end)
cost$0.0002
createdAt2026-04-28T18:47:26.680Z
gitCommit781e6c683dda
openscadOpenSCAD version 2026.04.27

prompt

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

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

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