Misc-3D-Prints/Electronics and Digital Fabrication/rotaryAttachmentCone.scad

34 lines
957 B
OpenSCAD

tipR = 70/2; // 95/2
baseR = 10;
length = 20;
thickness = 3;
connectorInnerR = 6/2;
connectorOuterR = 18/2;
connectorLength = 8;
connectorScrewD = 3.75; //4mm screws
shaftLength = 11.5;
shaftBaseToFlat = 1;
shaftFlat = 4;
difference() {
cylinder(r=connectorOuterR, h=connectorLength); // connector outer
translate([0,0,-0.01]) // connector inner
cylinder(r=connectorInnerR, h=shaftLength); // axel hole
translate([0,0,shaftBaseToFlat + shaftFlat/2]) { // screw holes
rotate(90, [1,0,0])
cylinder(d=connectorScrewD, h=connectorOuterR + 0.1);
rotate(90, [0,1,0])
cylinder(d=connectorScrewD, h=connectorOuterR + 0.1);
}
}
difference() { //cone
translate([0,0,connectorLength]) // outer
cylinder(r1=connectorOuterR, r2=tipR+thickness, h=length + (shaftLength - connectorLength));
translate([0,0,shaftLength]) // inner
cylinder(r1=baseR, r2=tipR, h=length + 0.01);
}