vibe-openscad

pdf-page/gemma-4-e2b / tier-4-gp2y0a21yk

render_error tier 4
error
openscad stl render failed (exit 1): ERROR: Parser error: syntax error in file ../../../../../tmp/render-Pbnghd/input.scad, line 36
Can't parse file '/tmp/render-Pbnghd/input.scad'!

pdf-page (google/gemma-4-e2b)

render
no render
render_error 13.7s · 719/1876t
openscad stl render failed (exit 1): ERROR: Parser error: syntax error in file ../../../../../tmp/render-Pbnghd/input.scad, line 36
Can't parse file '/tmp/render-Pbnghd/input.scad'!

SCAD (90 lines)
// Sharp GP2Y0A21YK0F External Dimensions Modeling (Based on Datasheet 2 Page)

// Coordinate System: Origin at body center. +Z is up, +Y is forward. Units are mm.

// --- Dimensions extracted from the datasheet for reference ---
// Note: These dimensions are interpreted based on the provided schematic and outline dimensions.
// The overall structure is defined by a main body, a linkage bar, and protruding lenses.

// Main Body Parameters (Interpreted from 'Outline Dimensions')
Body_Length = 37.1; // Overall length/depth reference
Body_Width = 27.0;   // Overall width reference
Body_Thickness = 16.7; // Thickness reference (This might be the thickness of the main housing)

Linkage_Bar_Length = 45.8; // Reference dimension for the linkage section length (from side view)

// Lens Parameters (Relative placement on top)
Lens_Diameter = 10.3;    // Diameter of the upper lens/window feature
Lens_Protrusion_Z = Body_Thickness + Lens_Diameter / 2; // Position where lenses protrude upwards

Linkage_Bar_Height = 3.5; // Reference dimension for the linkage bar thickness (estimated from context)
Cable_Exit_Cutout_Size = 10.3; // Dimension related to cable exit/attachment points

// --- Main Body Modeling (The housing block) ---
Module_Body() {
    // Center at (0, 0, 0)
    cube([Body_Width, Body_Length, Body_Thickness], center = true);
}

// --- Lens Modeling (Protruding above the body) ---
Module_Lenses() {
    // Place the lenses centered on the top surface (+Z direction)
    Lens_Radius = Lens_Diameter / 2;
    Lens_Z_Offset = Body_Thickness + (Body_Width / 2); // Position them relative to the origin

    // Light side lens (e.g., Receiver/Emitter area)
    translate([0, 0, Lens_Z_Offset], rotation=()) {
        cylinder(r=Lens_Radius, h=1, center=true);
    }

    // Other potential features (based on the description of separate light components)
    // Since the diagram shows a unified outer shape, we define the top surface based on the widest parts.
}

// --- Linkage Bar Modeling (Extending below the main body) ---
Module_Linkage_Bar() {
    // Position the linkage bar extending downward from the center of the body's length (+Y direction)
    linkage_offset = Body_Length / 2 - Linkage_Bar_Length / 2;

    translate([0, linkage_offset, 0]) {
        cube([Body_Width, Linkage_Bar_Length, Linkage_Bar_Height], center = true);
    }
}


// --- Cable Modeling (Simplified as a round rod) ---
Module_Cable() {
    Cable_Radius = 2.5; // Simplified radius for the cable representation
    Cable_Length = Body_Length;

    // Positioned along one side or defined by external exit points
    translate([Body_Width / 2 + Cable_Radius, 0, Cable_Length / 2]) {
        cylinder(r=Cable_Radius, h=Cable_Length);
    }
}


// --- Assembly ---
module GP2Y0A21YK0F_Model() {
    // 1. Main Body (Block)
    Module_Body();

    // 2. Linkage Bar (Attached to the lower part of the body)
    Module_Linkage_Bar();

    // 3. Lenses (Protrusion on top)
    Module_Lenses();

    // 4. Cable (Simplified representation)
    Module_Cable();

    // Optional: Define mounting holes/cutouts based on the linkage bar area (for visualization purposes)
    /*
    color("red")
    translate([0, Body_Length / 2 - Linkage_Bar_Length / 2, Linkage_Bar_Height / 2]) {
        cube([Body_Width * 0.5, Cable_Exit_Cutout_Size, Linkage_Bar_Height * 2], center = true);
    }
    */
}

GP2Y0A21YK0F_Model();

meta

runIdpdf-page_gemma-4-e2b-60888ff4465a-2026-04-29T13-38-37-191Z
matrixIdpdf-page/gemma-4-e2b
signature60888ff4465a1e20…
provideropenai-self-hosted
modelgoogle/gemma-4-e2b
harnesspdf-page
statusrender_error
duration13.68s (wallclock: load + prompt eval + generation + network)
TTFT0.777s
generation time12.68s (pure decode, excludes load + prompt eval)
tokens719 in / 1876 out
generation tok/s148.0 tok/s (pure decode rate)
wallclock tok/s137.1 tok/s (end-to-end)
createdAt2026-04-29T13:38:37.191Z
gitCommit27221824780d
openscadOpenSCAD version 2026.04.27

model metadata (self-hosted)

セルフホスト LLM はクラウドの単一 provider と違い、 実質「(モデル開発者, weight publisher, 量子化)」の組で挙動が決まる。 run 時に LM Studio / Ollama から取得した値:

publishergoogle
typevlm
archgemma4
quantizationQ4_K_M
max ctx131,072 tok
capabilitiestool_use
host GPUNVIDIA GeForce RTX 3090 (Vulkan)
host VRAM24 GB
host CPU12th Gen Intel(R) Core(TM) i9-12900K
host RAM32 GB

prompt

添付画像は Sharp 製測距センサ GP2Y0A21YK0F のデータシートのページです。
OpenSCAD でモデリングしてください。

座標系: 単位 mm、本体の中心を原点とし、取付面(PWB / コネクタ側)を -Z に向ける。

完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。