3d-stuff/openscad/own/Steckdosenleistenhalter/Halter.scad

102 lines
2.7 KiB
OpenSCAD
Raw Normal View History

2020-10-11 02:27:48 +02:00
// socket outlet mount / steckdosenleistenhalter
// by zeus - zeus@ctdo.de - CC-BY-NC-4.0
// -> https://www.thingiverse.com/zeus
// -> https://github.com/zeus86
// 2014-11-04
// ==============================================
holder_w=55; // real size of steckdosenleiste, not holder!
holder_h=41; // as above; better add 1mm or so here for not to tight fit
holder_d=15;
hole_dia=5;
material_t=4;
$fn=50;
// ==============================================
// define which clamp to draw
//endclamp_closed_flange();
//endclamp_closed();
endclamp_halfopen();
//midclamp_open();
//midclamp_allopen();
// ==============================================
module endclamp_closed(){
difference(){
//walls
translate([0,0,holder_d/2+material_t/2]){
cube([holder_w+2*material_t,holder_h+2*material_t,holder_d+material_t],center=true);}
translate([0,0,holder_d/2+material_t]){
cube([holder_w,holder_h,holder_d+0.1],center=true);}
//holes
for (N = [-holder_w/4, holder_w/4]){
translate([N,-material_t/2,holder_d/2+material_t/2]){rotate([90,0,0]){
cylinder(r=hole_dia,h=holder_h+2*material_t+0.1,center=true);}}
translate([N,holder_h/2+material_t/2,holder_d/2+material_t/2]){rotate([90,0,0]){
cylinder(r=hole_dia/2,h=material_t+0.1,center=true);}}
}
}
}
module endclamp_closed_flange(){
rotate([0,90,0]){
difference(){
union(){
rotate([0,180,0]){ translate([0,0,-holder_h/2+material_t/3]){ endclamp_closed();}}
translate([0,holder_h/2+material_t/2,holder_h/1.5-material_t/4]){
cube([holder_w+2*material_t,material_t,holder_d],center=true);
}
}
for (N = [-holder_w/4, holder_w/4]){
translate([N,-material_t/2,holder_d*1.5+material_t]){rotate([90,0,0]){
cylinder(r=hole_dia,h=holder_h+2*material_t+0.1,center=true);}}
translate([N,holder_h/2+material_t/2,holder_d*1.5+material_t]){rotate([90,0,0]){
cylinder(r=hole_dia/2,h=material_t+0.1,center=true);}}
}
}
}
}
module midclamp_open(){
difference(){
endclamp_closed();
translate([0,0,material_t/2]){
cube([holder_w,holder_h,2*material_t+0.1],center=true);
}
}
}
module midclamp_allopen(){
difference(){
endclamp_closed();
translate([0,0,material_t/2]){
cube([holder_w,holder_h,material_t+0.1],center=true);}
translate([0,-holder_h/2-material_t/2,holder_d/2+material_t/2])
cube([holder_w-material_t*3.5,material_t*2,holder_d+material_t+0.1],center=true); }
}
module endclamp_halfopen(){
difference(){
endclamp_closed();
translate([0,0,material_t/2]){
cylinder(r=holder_h/2,h=material_t+0.1,center=true);
}
for ( A = [-20 : 20] ){
translate([0,-holder_h/2-material_t/2,holder_d/2+material_t/2]){ rotate([0,A,0]){
cube([hole_dia*1.5,material_t*2,holder_d+2*material_t+0.1],center=true); }}
}
}
}