vibe-openscad

pdf-page/gemini-3.1-pro / tier-4-gp2y0a21yk

success tier 4

pdf-page (gemini 3.1 pro)

render
bare render of tier-4-gp2y0a21yk
loading STL…
success 132.6s · 1528/15913t · $0.1610
SCAD (86 lines)
$fn = 64;

module GP2Y0A21YK0F() {
    // 1. ベースプレート (メインケースと取付耳)
    // 原点(0,0,0)を中心に配置。Z軸は上(レンズ方向)、Y軸は前方(Stamp側)
    difference() {
        union() {
            // メインケース (幅29.5, 奥行13, 厚さ7.2)
            cube([29.5, 13, 7.2], center=true);
            
            // 取付耳 左
            translate([-14.75, 0, 0])
                cylinder(r=3.75, h=7.2, center=true);
            
            // 取付耳 右
            translate([14.75, 0, 0])
                cylinder(r=3.75, h=7.2, center=true);
        }
        
        // 取付穴 左 (φ3.2)
        translate([-14.75, 0, 0])
            cylinder(d=3.2, h=8, center=true);
            
        // 取付穴 右 (φ3.2)
        translate([14.75, 0, 0])
            cylinder(d=3.2, h=8, center=true);
    }

    // 2. レンズ部本体ケース
    difference() {
        union() {
            // 土台部 (高さ1.2)
            translate([0, 0, 3.6 + 0.6])
                cube([26.5, 11, 1.2], center=true);
            
            // レンズケース下段 (高さ2.0)
            translate([-0.25, 0, 4.8 + 1.0])
                cube([25.5, 9.5, 2.0], center=true);

            // レンズケース上段 (高さ4.3)
            translate([-0.25, 0, 6.8 + 2.15])
                cube([24.5, 8.5, 4.3], center=true);
        }
        
        // レンズ窓の窪み
        // 発光側(左) - 矩形 (中心距離 *4.5)
        translate([-10.25, 0, 11.1 - 0.5])
            cube([4.5, 5.5, 1.1], center=true);
            
        // 受光側(右) - 円形 (左レンズからの中心距離 *20)
        translate([9.75, 0, 11.1 - 0.5])
            cylinder(d=6.5, h=1.1, center=true);
    }
    
    // 内部レンズのダミー (窪みの奥)
    translate([-10.25, 0, 11.1 - 1.0])
        cube([3.5, 4.5, 1], center=true);
    translate([9.75, 0, 11.1 - 1.0])
        cylinder(d=5.5, h=1, center=true);

    // 3. ケーブル取り出し部 (PWB / コネクタ)
    difference() {
        union() {
            // PWB (基板)
            translate([0, -9.45, -3.0])
                cube([10.1, 5.9, 1.2], center=true);
            
            // コネクタ本体
            translate([0, -9.45, -1.35])
                cube([10.1, 5.9, 2.1], center=true);
        }
        
        // ケーブル取り出しの切欠き
        translate([0, -11.5, -1.35])
            cube([7.0, 5.0, 2.2], center=true);
    }

    // 4. ケーブル (丸棒で簡易表現)
    for (i = [-1, 0, 1]) {
        translate([i * 2.0, -11.0, -1.8])
            rotate([90, 0, 0])
            cylinder(d=1.2, h=20);
    }
}

GP2Y0A21YK0F();

meta

runIdpdf-page_gemini-3.1-pro-cfdd97365fd1-2026-09-05T13-44-42-879Z
matrixIdpdf-page/gemini-3.1-pro
signaturecfdd97365fd1ecae…
providergoogle
modelgemini-3.1-pro-preview
harnesspdf-page
statussuccess
duration132.58s (wallclock: load + prompt eval + generation + network)
tokens1528 in / 15913 out
wallclock tok/s120.0 tok/s (end-to-end)
cost$0.1610
createdAt2026-09-05T13:44:42.879Z
gitCommit31b26591f6ec
openscadOpenSCAD version 2026.04.27

prompt

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

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

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