closer to done...need to add DIN mount
This commit is contained in:
35
din_rail.scad
Normal file
35
din_rail.scad
Normal file
@@ -0,0 +1,35 @@
|
||||
//variables
|
||||
length = 100;// length of the DIN RAIN (MULTIPLES OF 10mm!)
|
||||
|
||||
hole = 4; //hole diamter
|
||||
|
||||
//code
|
||||
|
||||
translate([6.5,25/2,0])
|
||||
cube([1,5,length]);
|
||||
|
||||
translate([0,25/2,0])
|
||||
cube([7.5,1,length]);;
|
||||
|
||||
mirror([0,1,0]){
|
||||
|
||||
translate([6.5,25/2,0]){
|
||||
cube([1,5,length]);}
|
||||
translate([0,25/2,0]){
|
||||
cube([7.5,1,length]);};
|
||||
;}
|
||||
|
||||
for(i= [10:10:length])
|
||||
{
|
||||
difference()
|
||||
{
|
||||
translate([0,-25/2,i-10])
|
||||
cube([1,25,10]);
|
||||
b = i-5;
|
||||
translate([-2,0,b])
|
||||
rotate([0,90,0])
|
||||
cylinder(4,hole/2,hole/2, $fn=30);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,75 +1,151 @@
|
||||
// tape dimensions and tolerance
|
||||
tape_width=8;
|
||||
tape_thickness=1.5;
|
||||
tolerance=0.4;
|
||||
|
||||
// overall size (width determined by tape width)
|
||||
overall_depth=50;
|
||||
overall_height=60;
|
||||
tolerance=0.4;
|
||||
|
||||
// magnet size (set thickness and tolerance to 0 to omit)
|
||||
magnet_diameter=3;
|
||||
magnet_thickness=1;
|
||||
magnet_tolerance=0.2;
|
||||
|
||||
overall_width=tape_width+2+tolerance;
|
||||
|
||||
difference()
|
||||
translate([8, 30, 30])
|
||||
rotate([0, 180, 0])
|
||||
{
|
||||
// main body
|
||||
cube([overall_width, overall_depth, overall_height]);
|
||||
include <din_rail.scad>
|
||||
}
|
||||
|
||||
// tape well
|
||||
translate([1, overall_depth/2, overall_height/2])
|
||||
rotate([0, 90, 0])
|
||||
cylinder(d=overall_depth-4, h=1+tape_width+tolerance, $fn=360);
|
||||
rotate([0, -90, 0])
|
||||
body();
|
||||
|
||||
// chamfered hole for lid
|
||||
translate([0, overall_depth/2, overall_height/2])
|
||||
rotate([0, 90, 0])
|
||||
rotate_extrude($fn=360) // chamfer tool
|
||||
polygon([[0, 0], [8, 0], [7.5, .5], [8, 1], [0, 1]]);
|
||||
translate([-overall_height/2, 1.5*overall_depth+5, 0])
|
||||
lid();
|
||||
|
||||
// parts window on top
|
||||
translate([1+tolerance/2, 8, overall_height-1-tape_thickness-tolerance])
|
||||
cube([1+tape_width+tolerance, 17, 1+tape_thickness+tolerance]);
|
||||
|
||||
// tape slot at front
|
||||
translate([1, 0, overall_height-1-tape_thickness-tolerance])
|
||||
cube([tape_width+tolerance, overall_depth/2, tape_thickness+tolerance]);
|
||||
|
||||
// 15 mm radius at upper back
|
||||
translate([0, overall_depth-15, overall_height-15])
|
||||
rotate([90, 0, 90])
|
||||
module body()
|
||||
{
|
||||
difference()
|
||||
{
|
||||
cube([15, 15, 2+tape_width+tolerance]);
|
||||
cylinder(r=15, h=2+tape_width+tolerance, $fn=360);
|
||||
// main body
|
||||
cube([overall_width, overall_depth, overall_height]);
|
||||
|
||||
// tape well
|
||||
translate([1, overall_depth/2, overall_height/2])
|
||||
rotate([0, 90, 0])
|
||||
cylinder(d=overall_depth-4, h=1+tape_width+tolerance, $fn=360);
|
||||
|
||||
// chamfered hole for lid
|
||||
translate([0, overall_depth/2, overall_height/2])
|
||||
rotate([0, 90, 0])
|
||||
rotate_extrude($fn=360) // chamfer tool
|
||||
polygon([[0, 0], [8, 0], [7.5, .5], [8, 1], [0, 1]]);
|
||||
|
||||
// parts window on top
|
||||
translate([1+tolerance/2, 8, overall_height-1-tape_thickness-tolerance])
|
||||
cube([1+tape_width+tolerance, 17, 1+tape_thickness+tolerance]);
|
||||
|
||||
// tape slot at front
|
||||
translate([1, 0, overall_height-1-tape_thickness-tolerance])
|
||||
cube([tape_width+tolerance, overall_depth/2, tape_thickness+tolerance]);
|
||||
|
||||
// 15 mm radius at upper back
|
||||
translate([0, overall_depth-15, overall_height-15])
|
||||
rotate([90, 0, 90])
|
||||
difference()
|
||||
{
|
||||
cube([15, 15, 2+tape_width+tolerance]);
|
||||
cylinder(r=15, h=2+tape_width+tolerance, $fn=360);
|
||||
}
|
||||
|
||||
// tape path to well
|
||||
translate([1, overall_depth/2, overall_height-(overall_depth-4)/2-1])
|
||||
rotate([90, 0, 90])
|
||||
difference()
|
||||
{
|
||||
cylinder(d=overall_depth-4, h=1+tape_width+tolerance, $fn=360);
|
||||
translate([0, tape_thickness+tolerance, 0])
|
||||
cylinder(d=overall_depth-4-(tape_thickness+tolerance)*4, h=1+tape_width+tolerance, $fn=360);
|
||||
translate([-(overall_depth-4)/2, -(overall_depth-4)/2, 0])
|
||||
{
|
||||
cube([(overall_depth-4)/2, overall_depth-4, 1+tape_width+tolerance]);
|
||||
cube([overall_depth-4, (overall_depth-4)/2, 1+tape_width+tolerance]);
|
||||
}
|
||||
translate([0, (overall_depth-4)/2-4, tape_width+tolerance])
|
||||
cube([4, 4, 4]);
|
||||
}
|
||||
translate([1, overall_depth-5, overall_height/2])
|
||||
cube([1+tape_width+tolerance, 3, (overall_height-overall_depth)*.75]);
|
||||
|
||||
// film slot at top rear
|
||||
translate([1, 25, overall_height-.25])
|
||||
cube([tape_width+tolerance, overall_depth-25, .25]);
|
||||
|
||||
// label pocket on front
|
||||
translate([1, 0, 1])
|
||||
cube([tape_width+tolerance, .25, overall_height-3-tape_thickness-tolerance]);
|
||||
|
||||
// magnets
|
||||
translate([0, (overall_height-overall_depth)/2, overall_height-overall_depth])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=magnet_diameter+magnet_tolerance, h=magnet_thickness+magnet_tolerance, $fn=60);
|
||||
translate([0, overall_depth-(overall_height-overall_depth)/2, overall_height-overall_depth])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=magnet_diameter+magnet_tolerance, h=magnet_thickness+magnet_tolerance, $fn=60);
|
||||
translate([0, (overall_height-overall_depth)/2, overall_depth])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=magnet_diameter+magnet_tolerance, h=magnet_thickness+magnet_tolerance, $fn=60);
|
||||
translate([overall_width-magnet_thickness-magnet_tolerance, (overall_height-overall_depth)/2, overall_height-overall_depth])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=magnet_diameter+magnet_tolerance, h=magnet_thickness+magnet_tolerance, $fn=60);
|
||||
translate([overall_width-magnet_thickness-magnet_tolerance, overall_depth-(overall_height-overall_depth)/2, overall_height-overall_depth])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=magnet_diameter+magnet_tolerance, h=magnet_thickness+magnet_tolerance, $fn=60);
|
||||
translate([overall_width-magnet_thickness-magnet_tolerance, (overall_height-overall_depth)/2, overall_depth])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=magnet_diameter+magnet_tolerance, h=magnet_thickness+magnet_tolerance, $fn=60);
|
||||
}
|
||||
|
||||
// tape path to well
|
||||
translate([1, overall_depth/2, overall_height-(overall_depth-4)/2-1])
|
||||
rotate([90, 0, 90])
|
||||
difference()
|
||||
{
|
||||
cylinder(d=overall_depth-4, h=1+tape_width+tolerance, $fn=360);
|
||||
translate([0, tape_thickness+tolerance, 0])
|
||||
cylinder(d=overall_depth-4-(tape_thickness+tolerance)*4, h=1+tape_width+tolerance, $fn=360);
|
||||
translate([-(overall_depth-4)/2, -(overall_depth-4)/2, 0])
|
||||
{
|
||||
cube([(overall_depth-4)/2, overall_depth-4, 1+tape_width+tolerance]);
|
||||
cube([overall_depth-4, (overall_depth-4)/2, 1+tape_width+tolerance]);
|
||||
}
|
||||
translate([0, (overall_depth-4)/2-4, tape_width+tolerance])
|
||||
cube([4, 4, 4]);
|
||||
}
|
||||
translate([1, overall_depth-5, overall_height/2])
|
||||
cube([1+tape_width+tolerance, 3, (overall_height-overall_depth)*.75]);
|
||||
translate([1+tape_width+tolerance, 25, overall_height-1-tape_thickness-2])
|
||||
cube([1, overall_depth/2-21, tape_thickness+2]);
|
||||
|
||||
// film slot at top rear
|
||||
translate([overall_width-1, 25, overall_height])
|
||||
rotate([0,-90,0])
|
||||
linear_extrude(tape_width+tolerance, convexity=10)
|
||||
polygon([[0,0],[-3,overall_depth-25], [5,overall_depth-25],[3,0], [0,0]]);
|
||||
|
||||
translate([0, overall_depth-8, overall_height-1])
|
||||
cube([2+tape_width+tolerance, 3, 1]);
|
||||
translate([0, overall_depth-8, overall_height-5])
|
||||
cube([1, 3, 5]);
|
||||
translate([overall_width-1, overall_depth-8, overall_height-5])
|
||||
cube([1, 3, 5]);
|
||||
}
|
||||
|
||||
// film slot at top rear
|
||||
translate([0, overall_depth-10, overall_height-1])
|
||||
cube([2+tape_width+tolerance, 3, 1]);
|
||||
translate([0, overall_depth-10, overall_height-5])
|
||||
cube([1, 3, 5]);
|
||||
translate([overall_width-1, overall_depth-10, overall_height-5])
|
||||
cube([1, 3, 5]);
|
||||
module lid()
|
||||
{
|
||||
difference()
|
||||
{
|
||||
union()
|
||||
{
|
||||
cylinder(d=overall_depth-5, h=1, $fn=360);
|
||||
cylinder(d=15, h=overall_width, $fn=360);
|
||||
}
|
||||
cylinder(d=12, h=overall_width, $fn=360);
|
||||
translate([-1, -8, 1])
|
||||
cube([2, 16, overall_width]);
|
||||
translate([-8, -1, 1])
|
||||
cube([16, 2, overall_width]);
|
||||
translate([0, 0, overall_width-1])
|
||||
rotate_extrude($fn=360) // inverse of the previous chamfer tool
|
||||
polygon([[9, 0], [7.5, 0], [7, .5], [7.5, 1], [9, 1]]);
|
||||
rotate_extrude(angle=90, $fn=360)
|
||||
polygon([[10, 0], [(overall_depth-5)/2-5, 0], [(overall_depth-5)/2-5, 1], [10, 1], [10, 0]]);
|
||||
rotate([0,0,120])
|
||||
rotate_extrude(angle=90, $fn=360)
|
||||
polygon([[10, 0], [(overall_depth-5)/2-5, 0], [(overall_depth-5)/2-5, 1], [10, 1], [10, 0]]);
|
||||
rotate([0,0,240])
|
||||
rotate_extrude(angle=90, $fn=360)
|
||||
polygon([[10, 0], [(overall_depth-5)/2-5, 0], [(overall_depth-5)/2-5, 1], [10, 1], [10, 0]]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user