usb-c-dock: added options for dual holes

main
zeus 2023-03-14 22:39:26 +01:00
parent f51f197417
commit 83ab29095b
3 changed files with 8 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -24,6 +24,7 @@ q=0.01; // used to avoid graphical glitches
percentage=0.20; // how many % of the overall height (from the bottom) should be generated (default: 40%) percentage=0.20; // how many % of the overall height (from the bottom) should be generated (default: 40%)
hole_offset=15; // hole-distance from bottom hole_offset=15; // hole-distance from bottom
holedia=4.5; // diameter of the hole for the screw holedia=4.5; // diameter of the hole for the screw
dual_hole_spacing=width/1.75; // set to 0 if you want to use a single hole
// //
//################## //##################
// //
@ -36,18 +37,20 @@ module base(){
// inner cube // inner cube
translate([0,0,height/2+mt])cube([width,depth,height],center=true); translate([0,0,height/2+mt])cube([width,depth,height],center=true);
// front cutout // front cutout
translate([0,-(depth/2+mt/2),height/2+mt])cube([width-tab*2,mt+q,height-tab_bf´*2],center=true); translate([0,-(depth/2+mt/2),height/2+mt])cube([width-tab*2,mt+q,height-tab_bf*2],center=true);
// side cutout right // side cutout right
translate([+(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true); translate([+(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true);
// side cutout left // side cutout left
translate([-(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true); translate([-(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true);
// screwpost // screwpost
translate([0,depth/2+mt/2,hole_offset]){ for(x=[dual_hole_spacing/2,-dual_hole_spacing/2]){
translate([x,depth/2+mt/2,hole_offset]){
rotate([90,0,0]){ rotate([90,0,0]){
cylinder(r=holedia/2,h=mt+q,center=true); cylinder(r=holedia/2,h=mt+q,center=true);
translate([0,0,0.5])cylinder(r1=holedia/2,r2=holedia,h=3+q,center=true); translate([0,0,0.5])cylinder(r1=holedia/2,r2=holedia,h=3+q,center=true);
} }
} }
}
} }
}; };