add: openscad usb-c-wallmount

This commit is contained in:
zeus 2023-03-14 20:55:48 +01:00
parent 1e0d0c482e
commit cf524d52a9
3 changed files with 61 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,61 @@
// by zeus - zeus@ctdo.de - CC-BY-NC-4.00
// -> https://www.thingiverse.com/zeus
// -> https://www.printables.com/social/366928-zeus/about
// -> https://github.com/zeus86
// -> https://blog.tastatursport.de/
// 2023-03-14
// USB-C-Dock-Wallmount
//##################
//
//
//##################
//
// VARS
mt=4; // general material thickness
slack=0.5; // added slack to inner dimensions to allow easier fitment
width=85.5+slack; // inner width + slack
height=96+slack; // inner height + slack
depth=31+slack; // inner depth + slack
tab=5; // width of the tabbed section on the sides, that wraps around corners
tab_b=10; // width of the tabbed section on the bottom, that wraps around corners
tab_bf=tab; // width of the tabbed section on the bottom, front only
$fn=100; // general resolution
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%)
hole_offset=15; // hole-distance from bottom
holedia=4.5; // diameter of the hole for the screw
//
//##################
//
// MODEL
module base(){
difference(){
// outer cube
translate([0,0,height/2+mt])cube([width+2*mt,depth+2*mt,height+2*mt],center=true);
// inner cube
translate([0,0,height/2+mt])cube([width,depth,height],center=true);
// front cutout
translate([0,-(depth/2+mt/2),height/2+mt])cube([width-tab*2,mt+q,height-tab_bf´*2],center=true);
// side cutout right
translate([+(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true);
// side cutout left
translate([-(width/2+mt/2),0,height/2+mt])cube([mt+q,depth-tab*2,height-tab_b*2],center=true);
// screwpost
translate([0,depth/2+mt/2,hole_offset]){
rotate([90,0,0]){
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);
}
}
}
};
difference(){
base();
translate([0,0,(height+2*mt)/2+(height+2*mt)*percentage])cube([width+2*mt+q,depth+2*mt+q,height+2*mt],center=true);
};