P0188_Mosaik_Frontplatte/openscad/P0188-19-a_Anzeigefenster_1x1_Reflektor.scad
2024-09-08 16:21:06 +02:00

68 lines
2.3 KiB
OpenSCAD

//---------------------------------------------------------------------
//
// OpenSCAD-Script for mosaic 25x25mm reflector for LEd fits to -17
//
// derived from:
// https://github.com/MakeMagazinDE/OpenSCAD_Frontplatten/
//---------------------------------------------------------------------
//
// 2024-06-03 xsider modified for grid 25mm and M2-screws
//
//---------------------------------------------------------------------
beschriftung = "P0188-19-a";
module Reflektor(){
difference(){
union() {
cube([23-0.2,23-0.2,9]);
// Anschraubplatte für die Rückwand
translate([-1.1,25-1.1,1])
rotate([180,0,0])
BackElem();
}
translate([-1,-1,1])cylinder(d=5.7,h=9,$fn=128);
translate([-1,25-1,1])cylinder(d=5.7,h=9,$fn=128);
translate([25-1,-1,1])cylinder(d=5.7,h=9,$fn=128);
translate([25-1,25-1,1])cylinder(d=5.7,h=9,$fn=128);
// LED-Loch für 5mm herausschneiden
translate([12.5-1.1,12.5-1.1,-5])cylinder(h=20,d=5.1,$fn=128);
// Pyramide herausschneiden
translate([12.5-1.1,12.5-1.1,11])
rotate([180,0,0])
polyhedron(
points=[ [12.5,12.5,0],[12.5,-12.5,0],[-12.5,-12.5,0],[-12.5,12.5,0], // the four points at base
[0,0,12.5] ], // the apex point
faces=[ [0,1,4],[1,2,4],[2,3,4],[3,0,4], // each triangle side
[1,0,3],[2,1,3] ] // two triangles for square base
);
// Beschriftung
translate([3,7,-1.5])rotate([180,0,0])
linear_extrude(height=1)
{
text( text="P0188",size=5,font="osifont",valign=center,halign=center,$fn=50);
translate([0,-14,0])
text( text="-19-a",size=5,font="osifont",valign=center,halign=center,$fn=50);
}
}
}
module frontglas() {
difference(){
cube([23-0.2,23-0.2,3]);
translate([-1,-1,-1])cylinder(d=5.7,h=5,$fn=128);
translate([-1,25-1,-1])cylinder(d=5.7,h=5,$fn=128);
translate([25-1,-1,-1])cylinder(d=5.7,h=5,$fn=128);
translate([25-1,25-1,-1])cylinder(d=5.7,h=5,$fn=128);
}
}
translate([1.1,1.1,-10])
Reflektor();
// Frontglas
//%translate([1.1,1.1,-1])frontglas();