vibe-openscad

pdf-page/claude-haiku-4-5 / tier-4-gp2y0d413k

success tier 4

pdf-page (claude haiku 4.5)

render
bare render of tier-4-gp2y0d413k
loading STL…
success 14.9s · 1682/1529t · $0.0093
SCAD (131 lines)
// Sharp GP2Y0D413K0F Distance Sensor - OpenSCAD Model
// Unit: mm
// Origin: Center of the device, Z-axis points toward the front (opposite to mounting face)

// Main body case
module main_case() {
    // Main rectangular body
    cube([29.45, 13.65, 10.1], center=true);
}

// Light emitter (IR LED) - left side
module light_emitter() {
    translate([-9.7/2 - 1.5, 0, 5.05]) {
        cylinder(r=2.5, h=1.5, center=true, $fn=32);
    }
}

// Light detector - right side
module light_detector() {
    translate([9.7/2 + 1.5, 0, 5.05]) {
        // Main sensor lens
        cylinder(r=2.0, h=1.2, center=true, $fn=32);
    }
}

// Lens case (protruding part)
module lens_case() {
    translate([9.7/2 + 1.5, 0, 5.05]) {
        cylinder(r=2.2, h=2.3, center=true, $fn=32);
    }
}

// Connector - at the bottom
module connector() {
    // Connector body
    translate([0, 0, -5.05 - 1.2/2]) {
        cube([10.1, 7.5, 1.2], center=true);
    }
    // Connector pins area
    translate([0, 0, -5.05 - 1.2 - 0.8]) {
        cube([6.0, 4.15, 1.6], center=true);
    }
}

// PWB (Printed Wiring Board) mounting pads
module pwb() {
    translate([0, 0, -5.05 - 0.5]) {
        cube([29.45, 13.65, 0.3], center=true);
    }
}

// Terminal pins (3 pins)
module terminal_pins() {
    pin_positions = [
        [-2.5, -3.0],
        [0, -3.0],
        [2.5, -3.0]
    ];
    
    for (pos = pin_positions) {
        translate([pos[0], pos[1], -5.05 - 0.5 - 1.5]) {
            cube([0.4, 0.4, 3.0], center=true);
        }
    }
}

// Mounting bracket/tab (left side)
module mounting_tab() {
    translate([-14.725/2 - 2, 0, -5.05 + 0.75]) {
        cube([3.75, 13.65, 1.5], center=true);
    }
}

// Mounting bracket/tab (right side)
module mounting_tab_right() {
    translate([14.725/2 + 2, 0, -5.05 + 0.75]) {
        cube([3.75, 13.65, 1.5], center=true);
    }
}

// Complete assembly
module gp2y0d413k0f() {
    // Main body
    color([0.2, 0.2, 0.2])
    main_case();
    
    // Light emitter
    color([1, 0, 0])
    light_emitter();
    
    // Light detector lens
    color([0.8, 0.8, 1])
    light_detector();
    
    // Lens case
    color([0.3, 0.3, 0.3])
    lens_case();
    
    // Connector
    color([0.4, 0.4, 0.4])
    connector();
    
    // PWB
    color([0.6, 0.4, 0.2])
    pwb();
    
    // Terminal pins
    color([0.8, 0.8, 0.8])
    terminal_pins();
    
    // Mounting tabs
    color([0.3, 0.3, 0.3])
    mounting_tab();
    mounting_tab_right();
}

// Render the sensor
gp2y0d413k0f();

// Optional: Add coordinate system for reference
module coordinate_system() {
    // X axis (red)
    color([1, 0, 0]) translate([0, 0, 0]) cylinder(r=0.2, h=10, center=true, $fn=16);
    // Y axis (green)
    color([0, 1, 0]) rotate([90, 0, 0]) cylinder(r=0.2, h=10, center=true, $fn=16);
    // Z axis (blue)
    color([0, 0, 1]) rotate([0, 90, 0]) cylinder(r=0.2, h=10, center=true, $fn=16);
}

// Uncomment to show coordinate system
// coordinate_system();

meta

runIdpdf-page_claude-haiku-4-5-4e02806115da-2026-09-05T14-58-47-728Z
matrixIdpdf-page/claude-haiku-4-5
signature4e02806115da0e4c…
provideranthropic
modelclaude-haiku-4-5-20251001
harnesspdf-page
statussuccess
duration14.90s (wallclock: load + prompt eval + generation + network)
tokens1682 in / 1529 out
wallclock tok/s102.6 tok/s (end-to-end)
cost$0.0093
createdAt2026-09-05T14:58:47.728Z
gitCommitbd01efad622d
openscadOpenSCAD version 2026.04.27

prompt

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

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

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