Screw holes already done!
This commit is contained in:
		
							parent
							
								
									da79fb1c7a
								
							
						
					
					
						commit
						f2069651e5
					
				
					 1 changed files with 42 additions and 2 deletions
				
			
		| 
						 | 
					@ -3,10 +3,34 @@ $fn = 72;
 | 
				
			||||||
pcb_width  = 257.175;
 | 
					pcb_width  = 257.175;
 | 
				
			||||||
pcb_height =  95.250;
 | 
					pcb_height =  95.250;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module keyboard_base_plate(pcb_width, pcb_height) {
 | 
					screw_holes = [
 | 
				
			||||||
 | 
					    [  4.8150, 85.6188],
 | 
				
			||||||
 | 
					    [ 47.4822, 85.6188],
 | 
				
			||||||
 | 
					    [ 85.8150, 85.6188],
 | 
				
			||||||
 | 
					    [123,8150, 85.6188],
 | 
				
			||||||
 | 
					    [161.8150, 85.6188],
 | 
				
			||||||
 | 
					    [199.8150, 85.6188],
 | 
				
			||||||
 | 
					    [251.3150, 67.1188],
 | 
				
			||||||
 | 
					    [ 22.5650, 47.6187],
 | 
				
			||||||
 | 
					    [118.8150, 47.6187],
 | 
				
			||||||
 | 
					    [157.3150, 47.6187],
 | 
				
			||||||
 | 
					    [  4.7500, 28.7500],
 | 
				
			||||||
 | 
					    [ 29.7500, 28.7500],
 | 
				
			||||||
 | 
					    [227.8150, 28.7500],
 | 
				
			||||||
 | 
					    [251.8150, 28.7500],
 | 
				
			||||||
 | 
					    [ 42.8150,  9.1188],
 | 
				
			||||||
 | 
					    [ 85.8150,  9.1188],
 | 
				
			||||||
 | 
					    [123.8150,  9.1188],
 | 
				
			||||||
 | 
					    [161.8150,  9.1188],
 | 
				
			||||||
 | 
					    [200.3150,  9.1188]
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					module keyboard_base_plate(pcb_width, pcb_height, screw_holes=[]) {
 | 
				
			||||||
    pcb_clearance_edge   = 1.0;
 | 
					    pcb_clearance_edge   = 1.0;
 | 
				
			||||||
    pcb_clearance_bottom = 2.0;
 | 
					    pcb_clearance_bottom = 2.0;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    pcb_screw_hole_diameter = 1.5;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    thickness     = 2.0;
 | 
					    thickness     = 2.0;
 | 
				
			||||||
    wall_height   = 14.0;
 | 
					    wall_height   = 14.0;
 | 
				
			||||||
    corner_radius = thickness / 2.0;
 | 
					    corner_radius = thickness / 2.0;
 | 
				
			||||||
| 
						 | 
					@ -48,6 +72,14 @@ module keyboard_base_plate(pcb_width, pcb_height) {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    module screw_post(translation, h, d1, d2) {
 | 
				
			||||||
 | 
					        translate(translation)
 | 
				
			||||||
 | 
					        difference() {
 | 
				
			||||||
 | 
					            cylinder(h=h, r=d1/2.0);
 | 
				
			||||||
 | 
					            cylinder(h=h, r=d2/2.0);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    /* Lower left corner */
 | 
					    /* Lower left corner */
 | 
				
			||||||
    round_corner([0 - pcb_clearance_edge,
 | 
					    round_corner([0 - pcb_clearance_edge,
 | 
				
			||||||
                  0 - pcb_clearance_edge, 0], [-90, 90, 90]);
 | 
					                  0 - pcb_clearance_edge, 0], [-90, 90, 90]);
 | 
				
			||||||
| 
						 | 
					@ -138,6 +170,14 @@ module keyboard_base_plate(pcb_width, pcb_height) {
 | 
				
			||||||
         [2 * pcb_clearance_edge + pcb_width,
 | 
					         [2 * pcb_clearance_edge + pcb_width,
 | 
				
			||||||
          2 * pcb_clearance_edge + pcb_height,
 | 
					          2 * pcb_clearance_edge + pcb_height,
 | 
				
			||||||
          thickness]);
 | 
					          thickness]);
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					    /* Screw holes */
 | 
				
			||||||
 | 
					    for (screw_hole = screw_holes) {
 | 
				
			||||||
 | 
					        screw_post([screw_hole[0], screw_hole[1], thickness],
 | 
				
			||||||
 | 
					                   pcb_clearance_bottom,
 | 
				
			||||||
 | 
					                   pcb_screw_hole_diameter * 2,
 | 
				
			||||||
 | 
					                   pcb_screw_hole_diameter);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
keyboard_base_plate(pcb_width, pcb_height);
 | 
					keyboard_base_plate(pcb_width, pcb_height, screw_holes);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue