added kitt matrix
This commit is contained in:
		
							
								
								
									
										106
									
								
								openscad/own/kitt-matrix/src/kitt-matrix.scad
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								openscad/own/kitt-matrix/src/kitt-matrix.scad
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,106 @@ | ||||
| /*  | ||||
| Case for LED-Matrix of the KITT-Voice-Assistant | ||||
| by zeus - 2024-08-17 - CC-BY-SA-NC-4.0 | ||||
| https://git.kostianix.de/zeus/3d-stuff/src/branch/main/openscad/own/kitt-matrix | ||||
| */ | ||||
|  | ||||
| // ########################################## | ||||
| // VARS: | ||||
| $fn=25;         // overall render quality | ||||
| q=0.01;         // only used to get rid of visual glitches. can be set to 0 for productive exports. | ||||
| mt=9;           // material thickness, NOT overall thickness in case of a rim! | ||||
| pt=3;           // panel thickness | ||||
| mt_inner=2;     // constrained wall thickness for inside-walls between LEDs | ||||
| panel_w=67;     // overall width of led panel | ||||
| panel_h=66;     // same for height | ||||
| panel_t_pcb=1.5;    // height of PCB | ||||
| panel_t_led=1.5;    // height of the soldered LED modules | ||||
| panel_t=(panel_t_pcb+panel_t_led);    // overall thickness of the PCB+LEDs (~50:50) | ||||
| led_spacing_x=8.5;  // center-to-center spacing from LED to next LED, in width/x-axis-direction | ||||
| led_spacing_y=8;    // same for height/Y-axis | ||||
| led_w=4.5+1.5; | ||||
| led_h=5+1; | ||||
| led_num_x=8; | ||||
| led_num_y=8; | ||||
| offset_left=((panel_w-((led_num_x*led_w)+((led_num_x-1)*(led_spacing_x-led_w))))/2); // offset on one side (effectively "panel_w-e2e_x/2", but properly calculated) | ||||
| offset_top= ((panel_h-((led_num_y*led_h)+((led_num_y-1)*(led_spacing_y-led_h))))/2); // offset on one side (effectively "panel_h-e2e_y/2", but properly calculated) | ||||
|  | ||||
| e2e_x=64;       // width/x-axis edge-to-edge-distance from beginning of first to end of last LED (LED-Case, not soldering-points). for reference only | ||||
| e2e_y=61.75;    // same for height/Y-axis | ||||
|  | ||||
| conhole_d=4;    // connection hole between frame parts  | ||||
| conhole_taper_h=2;    // is this needed? | ||||
| conhole_i_d=2.75;   // should fit M3 | ||||
| conhole_offset=3.5; //offset from outer perimeter | ||||
| cutout_w=10; | ||||
| //echo("offset left is ",offset_left); | ||||
| //echo("offset top is ",offset_top); | ||||
|  | ||||
|  | ||||
| // ########################################## | ||||
|  | ||||
| // MODULES: | ||||
|  | ||||
| module panel(){ | ||||
|     // PCB: | ||||
|     cube([panel_w,panel_h,panel_t_pcb+q],center=true); | ||||
|     // overcomplicated "for" to determine the exact positions of the LEDs on the board. | ||||
|     // The LEDs themselves are not needed for rendering | ||||
|     // LEDs: | ||||
| /* | ||||
|         for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[0:led_spacing_y:led_spacing_y*(led_num_y-1)]) | ||||
|         translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_led])color( "#ff0000" )cube([led_w,led_h,panel_t_led],center=true); | ||||
| */ | ||||
|     // "lightpipes": | ||||
|     // left column (span 2 wide each) | ||||
|     for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[0:led_spacing_y]) | ||||
|         translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true);       | ||||
|     // center column (span 2 wide each) | ||||
|     for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[led_spacing_y*3:led_spacing_y*4]) | ||||
|         translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true);   | ||||
|     // right column (span 2 wide each) | ||||
|     for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[led_spacing_y*6:led_spacing_y*7]) | ||||
|         translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true); | ||||
|     // smaller inbetween columns (span 1 wide each) | ||||
|     for (num_x=[0:led_spacing_x:led_spacing_x*(led_num_x-1)],num_y=[led_spacing_y*2,led_spacing_y*5]) | ||||
|         translate([-(panel_w/2-led_w/2)+offset_left+num_x,-(panel_h/2-led_h/2)+offset_top+num_y,panel_t_pcb+panel_t_led*1.5])color( "#00ff00" )cube([led_w,led_h,panel_t_led*4+q],center=true); | ||||
|  | ||||
| } | ||||
| module panelholder(){ | ||||
|     translate([0,0,panel_t_pcb])difference(){ | ||||
|         cube([panel_w+mt,panel_h+mt,(panel_t+(panel_t_pcb+panel_t_led*2))],center=true); | ||||
|         translate([0,0,-(panel_t_pcb+panel_t_led)]) | ||||
|             panel(); | ||||
|         //translate([0,0,-panel_t_led*3])cube([panel_w,panel_h,(panel_t+(panel_t_led*3))],center=true); | ||||
|         // screwholes for M3 | ||||
|         for ( | ||||
|             pos_x=[-(panel_w+mt)/2+conhole_offset, | ||||
|                     (panel_w+mt)/2-conhole_offset], | ||||
|             pos_y=[-(panel_h+mt)/2+conhole_offset, | ||||
|                     (panel_h+mt)/2-conhole_offset] | ||||
|         ) | ||||
|             translate([pos_x,pos_y,-1]) | ||||
|                 #cylinder(d=conhole_i_d,h=(panel_t+(panel_t_led*3)+q),center=true); | ||||
|     } | ||||
| } | ||||
|  | ||||
| module panelframe(){ | ||||
|     translate([0,0,panel_t_pcb])difference(){ | ||||
|         cube([panel_w+mt,panel_h+mt,(panel_t+(panel_t_led*8))],center=true); | ||||
|         translate([cutout_w/2,0,pt])cube([panel_w-(offset_left*2)+cutout_w,panel_h-(offset_top*2),(panel_t+(panel_t_led*8))+q],center=true); | ||||
|         for ( | ||||
|             pos_x=[-(panel_w+mt)/2+conhole_offset, | ||||
|                     (panel_w+mt)/2-conhole_offset], | ||||
|             pos_y=[-(panel_h+mt)/2+conhole_offset, | ||||
|                     (panel_h+mt)/2-conhole_offset]) | ||||
|             { | ||||
|             translate([pos_x,pos_y,0])cylinder(d=conhole_d,h=(panel_t+(panel_t_led*8))+q,center=true); | ||||
|             translate([pos_x,pos_y,-(panel_t+(panel_t_led*8))/2+conhole_taper_h/2])cylinder(d2=conhole_d,d1=conhole_d*1.5,h=conhole_taper_h+q,center=true); | ||||
|             } | ||||
|     } | ||||
| } | ||||
| // ########################################## | ||||
|  | ||||
| // DRAW MODEL: | ||||
| panelholder(); | ||||
| translate([0,0,-(panel_t+(panel_t_led*3))-50])panelframe(); | ||||
							
								
								
									
										
											BIN
										
									
								
								openscad/own/kitt-matrix/stl/kitt-matrix_draft1.stl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								openscad/own/kitt-matrix/stl/kitt-matrix_draft1.stl
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user