55 lines
1.7 KiB
OpenSCAD
55 lines
1.7 KiB
OpenSCAD
// Parametric switch wall mount
|
|
// by zeus - zeus@ctdo.de - CC-BY-NC-4.0
|
|
// -> https://www.thingiverse.com/zeus
|
|
// -> https://github.com/zeus86
|
|
// 2014-12-28
|
|
//
|
|
// the switch I tested had following measures:
|
|
// 25x85x155mm (longshine 8-port gbit switch)
|
|
// ==============================================
|
|
|
|
|
|
|
|
holder_w=88; // real size of switch, not holder!
|
|
holder_h=27; // as above; better add 0.5mm or so here for not to tight fit
|
|
holder_d=15;
|
|
hole_dia=5;
|
|
material_t=4;
|
|
$fn=100;
|
|
|
|
// ==============================================
|
|
|
|
// define which clamp to draw
|
|
endclamp_open();
|
|
|
|
// ==============================================
|
|
|
|
module endclamp_open(){
|
|
difference(){
|
|
//walls
|
|
union(){
|
|
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,holder_h/2+material_t/2,holder_d*1.5+material_t]){
|
|
cube([holder_w+2*material_t,material_t,holder_d],center=true);}
|
|
}
|
|
translate([0,0,holder_d/2+material_t/2]){
|
|
cube([holder_w,holder_h,holder_d+material_t+0.1],center=true);}
|
|
//holes
|
|
for (N = [-holder_w/3, holder_w/3]){
|
|
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);}}
|
|
}
|
|
//you might want to delete the following 2 lines, if you don't want that curved cut-out
|
|
//alternatively this is the place where you can replace it with a rectangular cut-out
|
|
translate([0,-material_t-0.1,holder_w*0.85]){rotate([90,0,0]){
|
|
cylinder(r=holder_w/1.25,h=holder_h+2*material_t+0.1,center=true);}}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|