vibe-openscad

pdf-page/gemma-4-12b-qat / tier-4-gp2y0d413k

success tier 4

pdf-page (google/gemma-4-12b-qat)

render
bare render of tier-4-gp2y0d413k
loading STL…
success 91.1s · 1070/6865t
SCAD (66 lines)
// Sharp GP2Y0D413K0F Distance Sensor
// Model based on the provided datasheet.
// Units: mm
// Coordinate System:
// - Origin (0,0,0) is at the center of the body.
// - Mounting surface (PWB side) faces the -Z direction.

$fn = 50;

// --- Parameters ---
// Body dimensions
body_w = 29.45;
body_h = 13.5;
body_d = 18.6;

// Connector / PWB dimensions
pwb_w = 10.1;
connector_d = 3.3;
connector_h = 13.0; // Slightly shorter than the body height

// Lens Case front face
lens_w = 7.1;
lens_h = 13.05;

// --- Modules ---

module body() {
    // Main body block
    // The depth is 18.6. Since origin is center, Z goes from -9.3 to 9.3.
    cube([body_w, body_h, body_d], center = true);
}

module connector() {
    // The connector is on the PWB side (-Z direction).
    // PWB face is at Z = -9.3.
    // Connector extends further in -Z by 3.3mm.
    // Center of connector is at Z = -9.3 - (3.3 / 2) = -10.95.
    translate([0, 0, -9.3 - (connector_d / 2)])
        cube([pwb_w, connector_h, connector_d], center = true);
}

module lens_case_detail() {
    // The front face of the "Lens case" is narrower (7.1mm).
    // It occupies the front-most part of the body.
    // We model this as a slight step/profile on the front.
    // This is a simplified representation of the lens housing.
    translate([0, 0, 8.5]) // Positioned at the front
        difference() {
            // Main front area
            cube([lens_w, lens_h, 2], center = true);
            // Keep it slightly recessed or flat to match the drawing
        }
}

// --- Assembly ---

union() {
    body();
    connector();
    lens_case_detail();
}

// Note: 
// The -Z direction is the mounting face. 
// The body sits in the +Z region (mostly), 
// while the connector sticks out in the -Z region.
パラメータ (8) —
スライダを動かすと openscad-wasm で再レンダリング

meta

runIdpdf-page_gemma-4-12b-qat-632bc7186902-2026-09-23T10-47-19-068Z
matrixIdpdf-page/gemma-4-12b-qat
signature632bc7186902e0e9…
provideropenai-self-hosted
modelgoogle/gemma-4-12b-qat
harnesspdf-page
statussuccess
duration91.09s (wallclock: load + prompt eval + generation + network)
tokens1070 in / 6865 out
wallclock tok/s75.4 tok/s (end-to-end)
createdAt2026-09-23T10:47:19.069Z
gitCommit54e55cb7b2b0
openscadOpenSCAD version 2026.09.23

prompt

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

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

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