Browse Source

Almost done with the design.

master
Maximilian Stiefel 8 years ago
parent
commit
0afa5eb39f
  1. 55
      cad/housing.scad
  2. 6
      cad/open_box.scad

55
cad/housing.scad

@ -10,30 +10,53 @@ use <open_box.scad>
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// Vars // Vars
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
length = 50; allowance_pcb = 1;
width = 80; allowance_glass = 0.5;
width = 50 + 2*allowance_pcb;
length = 80 + 2*allowance_pcb;
height = 45; height = 45;
thickness = 10; thickness = 5;
allowance = 1;
lid_depth = 5; lid_depth = 5;
bolt_diameter = 4; bolt_diameter = 5.5; // According to the Farnell datasheet
bolt_spacing = 5; bolt_spacing = 5;
my_color = "SteelBlue"; my_color = "DarkRed";
glass_width = 26;
glass_height = 2 + allowance_glass;
difference(){
union(){
// Using my open box module for creating a simple box // Using my open box module for creating a simple box
color(my_color, 0.8) color(my_color, 0.8)
open_box(length, width, height, thickness, allowance); open_box(length, width, height, thickness);
// Creating a depening for the lid // Creating a depening for the lid
color(my_color, 0.9) color(my_color, 0.9)
*translate([thickness/2, thickness/2, height]) translate([thickness/2, thickness/2, height+1])
cube([length + 2*allowance + thickness, width + 2*allowance + thickness, lid_depth]); cube([length + thickness, width + thickness, lid_depth+1]);
// Cylindric holes for the PCB
*color(my_color, 1.0) translate([0, 0, thickness/2]){ // Cylindric holes for the PCBs
translate([thickness + bolt_spacing, bolt_spacing + thickness, 0]) color(my_color, 1.0) translate([0, 0, thickness/2]){
translate([thickness + bolt_spacing, thickness + bolt_spacing, 0])
cylinder(r=bolt_diameter/2, h=thickness/2+1);
translate([length + thickness - bolt_spacing, thickness + bolt_spacing, 0])
cylinder(r=bolt_diameter/2, h=thickness/2+1);
translate([length + thickness - bolt_spacing, width + thickness - bolt_spacing, 0])
cylinder(r=bolt_diameter/2, h=thickness/2+1);
translate([thickness + bolt_spacing, width + thickness - bolt_spacing, 0])
cylinder(r=bolt_diameter/2, h=thickness/2+1); cylinder(r=bolt_diameter/2, h=thickness/2+1);
} }
*translate([0,0,0])
cube([90, thickness, 50]); color(my_color, 0.6) union(){
// Slots for glass slide
// Slot in the back
translate([length + thickness/2, thickness + (width - glass_width)/2, (height + thickness)/2])
cube([thickness, glass_width, glass_height]);
// Slot in the front
translate([-1, thickness + (width - glass_width)/2, (height + thickness)/2])
cube([thickness + 2, glass_width, glass_height]);
}
} }
color(my_color, 0.8)
translate([thickness/2, thickness/2, height + 10])
import("lid.stl");

6
cad/open_box.scad

@ -5,16 +5,14 @@
// Last modification: 26.04.3017 // Last modification: 26.04.3017
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
module open_box(width, length, height, thickness, allowance) module open_box(width, length, height, thickness)
{ {
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// Vars // Vars
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
edge_rounding = 15; edge_rounding = 8;
compensation = 2*abs(edge_rounding-thickness); compensation = 2*abs(edge_rounding-thickness);
width = width + 2*allowance;
length = length + 2*allowance;
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// Action // Action

Loading…
Cancel
Save