vibe-openscad

bare-think-off/gemma-4-26b-a4b-it / tier-2-hex-bolt

success tier 2

bare (gemma 4 26b a4b)

render
bare render of tier-2-hex-bolt
loading STL…
success 11.8s · 173/484t · $0
SCAD (42 lines)
// M8 Bolt (Simplified)
// Dimensions:
// Head: Hexagonal, across-flats 13mm, height 5.3mm
// Shank: Diameter 8mm, length 30mm

$fn = 50; // Smoothness for cylinders

// Parameters
head_across_flats = 13;
head_height = 5.3;
shank_diameter = 8;
shank_length = 30;

// Calculate circumradius for the hexagon based on across-flats distance
// circumradius = (across_flats / 2) / cos(30)
hex_radius = (head_across_flats / 2) / cos(30);

module m8_bolt() {
    // Head: Positioned at z=0, extending to z=5.3
    translate([0, 0, 0])
    cylinder(h = head_height, r = hex_radius, $fn = 6);

    // Shank: Positioned with bottom at z=0, extending to z=-30
    translate([0, 0, -shank_length])
    cylinder(h = shank_length, d = shank_diameter);
}

// Rotate or reorient if needed, but following prompt:
// "Head bottom at origin, shank extends to z < 0"
// To align with "center axis is +Z direction" while "shank is z < 0",
// we must interpret that the bolt axis is the Z axis, but the geometry
// placement is as requested.
// The prompt says: "Center axis is +Z direction" AND "Shank is z < 0".
// This implies the bolt points "down" relative to the head.

// Since the prompt asks for the Shank to be z < 0 and Head bottom at z=0:
// The axial direction of the bolt (from head to tip) is -Z.
// To make the "axis" +Z, we can rotate the whole object 180 deg, 
// but the prompt specifically dictates the Z coordinates.
// I will follow the specific coordinate instructions.

m8_bolt();
パラメータ (4) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdbare-think-off_gemma-4-26b-a4b-it-26e3d2b1a534-2026-10-06T19-44-34-173Z
matrixIdbare-think-off/gemma-4-26b-a4b-it
signature26e3d2b1a5349269…
providergoogle
modelgemma-4-26b-a4b-it
harnessbare
statussuccess
duration11.78s (wallclock: load + prompt eval + generation + network)
tokens173 in / 484 out
wallclock tok/s41.1 tok/s (end-to-end)
cost$0
createdAt2026-10-06T19:44:34.173Z
gitCommitf9f85ea20c03
openscadOpenSCAD version 2026.09.23

prompt

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

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

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