diameter = 15; outerdiameter = 50; height = 11; width = 70; length = 80; resolution = 36; spacing=2; rounding = 5; bottomHeight=2; //0.6mm Drucktasterhöhe buttonHeight=7; buttonWidth =6; buttonLength =length-3*11;//22; buttonPinOffset=4; bearingDiameter = 10.5; bearingHeight = 4; bearingInner=7.4; screwDiameter = 3.2; //5.1; screwHead = 5.7; screwNut = 7; cableWidth=4; cableHeight=2; rotate([0,180,0]) difference() { outline(); lowerhalf(spacing); } translate([0,length-4,bottomHeight]) union() { difference() { // Bodenplatte union() { difference() { translate([0,0,0]) intersection() { outline(); lowerhalf(0); } translate([0,-length+diameter*1.5/2,0]) // shortened inlay cube([width,length,height*2], center=true); } translate([0,0,-height/2-bottomHeight/2]) cube([width/1.1-diameter,length-diameter*1.5,bottomHeight], center=true); translate([0,diameter*0.125,-height/2-bottomHeight/2]) cube([width/3,length-diameter*1.25,bottomHeight], center=true); difference() { translate([0,(length-diameter)/2,-(height+bottomHeight*2)/4]) cube([width/3,height+bottomHeight*2,(height+bottomHeight*2)/2], center=true); translate([0,(length-diameter)/2,0]) rotate([0,90,0]) cylinder(d=height+bottomHeight*2, h=width/3, $fn=resolution, center=true); } } //Bohrungen ecke bodenplatte translate([width/2.5-diameter/2-screwDiameter,length/2.5-diameter/2-screwDiameter,0]) cylinder(d=screwDiameter, h=height*5, $fn=resolution, center=true); translate([-(width/2.5-diameter/2-screwDiameter),length/2.5-diameter/2-screwDiameter,0]) cylinder(d=screwDiameter, h=height*5, $fn=resolution, center=true); translate([width/2.5-diameter/2-screwDiameter,-(length/2.5-diameter/2-screwDiameter),0]) cylinder(d=screwDiameter, h=height*5, $fn=resolution, center=true); translate([-(width/2.5-diameter/2-screwDiameter),-(length/2.5-diameter/2-screwDiameter),0]) cylinder(d=screwDiameter, h=height*5, $fn=resolution, center=true); //Rillen im Boden translate([0,0,-height/2]) rotate([90,0,0]) cylinder(d=buttonWidth, h=length, center=true, $fn=resolution); translate([0,0,-height/2-bottomHeight/2]) cube([buttonWidth,length*2, bottomHeight], center=true); } } module lowerhalf(gap) { translate([0,-diameter*0.25,-(height-buttonHeight)/2]) // button part cube([width/3+gap, length-diameter*1.5+gap,buttonHeight],center=true); translate([0,(length-diameter+gap)/2,-(height-buttonHeight)/2]) // connector cube([width/3+gap, (length-diameter+gap)/2,buttonHeight],center=true); translate([0,(length-diameter)/2,0]) // rotating cylinder rotate([0,90,0]) cylinder(d=diameter+gap, h=width/3+gap, center=true, $fn=resolution); } //outline(); module outline() { difference() { union() { minkowski() { // outer hull hull() { translate([(width-outerdiameter-height)/2,(length-outerdiameter-height)/2,0]) cylinder(d=outerdiameter, h=0.01, center=true, $fn=resolution*2); translate([-(width-outerdiameter-height)/2,(length-outerdiameter-height)/2,0]) cylinder(d=outerdiameter, h=0.01, center=true, $fn=resolution*2); translate([(width-outerdiameter-height)/2,-(length-outerdiameter-height)/2,0]) cylinder(d=outerdiameter, h=0.01, center=true, $fn=resolution*2); translate([-(width-outerdiameter-height)/2,-(length-outerdiameter-height)/2,0]) cylinder(d=outerdiameter, h=0.01, center=true, $fn=resolution*2); } sphere(d=height, $fn=resolution*2); } translate([0,(length-diameter)/2,0]) rotate([0,90,0]) cylinder(d=height+bottomHeight*2, h=width/3, $fn=resolution, center=true); } translate([0,(length-diameter)/2,0]) // center hole - force over bearing, therefore big enough center hole rotate([0,90,0]) cylinder(d=bearingInner, h=width/3, $fn=resolution, center=true); translate([0,(length-diameter)/2,0]) // center hole for screw - over whole width rotate([0,90,0]) cylinder(d=screwDiameter, h=width, $fn=resolution, center=true); translate([width/6-bearingHeight/2,(length-diameter)/2,0]) // left hole for bearing rotate([0,90,0]) cylinder(d=bearingDiameter, h=bearingHeight, $fn=resolution, center=true); translate([-(width/6-bearingHeight/2),(length-diameter)/2,0]) // right hole for bearing rotate([0,90,0]) cylinder(d=bearingDiameter, h=bearingHeight, $fn=resolution, center=true); translate([width/4+width/6+spacing+3,(length-diameter)/2,0]) // left hole screw rotate([0,90,0]) cylinder(d=screwHead, h=width/2, $fn=resolution, center=true); translate([-(width/4+width/6+spacing+3),(length-diameter)/2,0]) // right hole screw rotate([0,90,0]) cylinder(d=screwNut, h=width/2, $fn=6, center=true); translate([0,0,-(height-buttonHeight)/2]) // hole for button cube([buttonWidth,buttonLength,buttonHeight], center=true); for (i=[-1:6]) { translate([0,-length/5+i*6,-(height-buttonHeight)/2-2]) rotate([0,90,0]) cylinder(d=2.2, h=width/3, center=true, $fn=resolution); translate([width/6-buttonWidth/3,-length/5+i*6,-(height-buttonHeight)/2-2]) rotate([0,90,0]) cylinder(d=4, h=width/6-buttonWidth, center=true, $fn=resolution); translate([-width/6+buttonWidth/3,-length/5+i*6,-(height-buttonHeight)/2-2]) rotate([0,90,0]) cylinder(d=4, h=width/6-buttonWidth, center=true, $fn=resolution); } translate([0,0,-height/2]) rotate([90,0,0]) cylinder(d=buttonWidth, h=length, center=true, $fn=resolution); } }