changed oem_hk to shared component lib, added new standoff end type none

This commit is contained in:
Edward Kisiel
2024-03-15 15:26:23 -04:00
parent 2dc8e16f1e
commit 8bf424b99b
4 changed files with 142 additions and 166 deletions

View File

@@ -21,7 +21,7 @@
USAGE: standoff(stand_off, mask)
stand_off[radius, height, supportsize, supportheight, sink, pillarstyle,
stand_off[radius, height, holesize, supportsize, supportheight, sink, pillarstyle,
pillarsupport, reverse, insert_e, i_dia, i_depth], mask)
radius = pillar radius
@@ -78,58 +78,61 @@ module standoff(stand_off, mask){
difference (){
union () {
if(pillarstyle == "hex" && reverse == false) {
rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6);
rotate([0,0,30]) cylinder(d=radius*2/sqrt(3), h=height, $fn=6);
}
if(pillarstyle == "hex" && reverse == true) {
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3),h=height,$fn=6);
translate([0,0,-height]) rotate([0,0,30]) cylinder(d=radius*2/sqrt(3), h=height, $fn=6);
}
if(pillarstyle == "round" && reverse == false) {
cylinder(d=radius,h=height);
cylinder(d=radius, h=height);
}
if(pillarstyle == "round" && reverse == true) {
translate([0,0,-height]) cylinder(d=radius,h=height);
translate([0,0,-height]) cylinder(d=radius, h=height);
}
if(reverse == true) {
translate([0,0,-supportheight]) cylinder(d=supportsize,h=supportheight);
translate([0,0,-supportheight]) cylinder(d=supportsize, h=supportheight);
}
else {
cylinder(d=(supportsize),h=supportheight);
}
if(pillarsupport == "rear" && reverse == true) {
translate([-1,-supportsize/2,-height]) cube([2,supportsize/2,height]);
translate([-1,-supportsize/2,-height]) cube([2, supportsize/2, height]);
}
if(pillarsupport == "rear" && reverse == false) {
translate([-1,-supportsize/2,0]) cube([2,supportsize/2,height]);
translate([-1,-supportsize/2,0]) cube([2, supportsize/2, height]);
}
if(pillarsupport == "front" && reverse == true) {
translate([-1,0,-height]) cube([2,supportsize/2,height]);
translate([-1,0,-height]) cube([2, supportsize/2, height]);
}
if(pillarsupport == "front" && reverse == false) {
translate([-1,0,0]) cube([2,supportsize/2,height]);
translate([-1,0,0]) cube([2, supportsize/2, height]);
}
if(pillarsupport == "left" && reverse == true) {
translate([-supportsize/2,-1,-height]) cube([supportsize/2,2,height]);
translate([-supportsize/2,-1,-height]) cube([supportsize/2, 2, height]);
}
if(pillarsupport == "left" && reverse == false) {
translate([-supportsize/2,-1,0]) cube([supportsize/2,2,height]);
translate([-supportsize/2,-1,0]) cube([supportsize/2, 2, height]);
}
if(pillarsupport == "right" && reverse == true) {
translate([0,-1,-height]) cube([supportsize/2,2,height]);
translate([0,-1,-height]) cube([supportsize/2, 2, height]);
}
if(pillarsupport == "right" && reverse == false) {
translate([0,-1,0]) cube([supportsize/2,2,height]);
translate([0,-1,0]) cube([supportsize/2, 2, height]);
}
}
// hole
if(sink == "none" && reverse == false) {
translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2));
}
if(sink != "blind" && reverse == false) {
translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2));
translate([0,0,-adj]) cylinder(d=holesize, h=height+(adj*2));
}
if(sink != "blind" && reverse == true) {
translate([0,0,-adj-height]) cylinder(d=holesize, h=height+(adj*2));
translate([0,0,-adj-height]) cylinder(d=holesize, h=height+(adj*2));
}
// countersink hole
if(sink == "countersunk" && reverse == false) {
translate([0,0,-adj]) cylinder(d1=6.5, d2=holesize, h=3.25);
#translate([0,0, -adj]) cylinder(d1=6.5, d2=holesize, h=3.25);
}
if(sink == "countersunk" && reverse == true) {
translate([0,0,+adj-2.5]) cylinder(d1=holesize, d2=6.5, h=3.25);