added nut_holder module and amended h3_ultimate2 case.

This commit is contained in:
Edward Kisiel
2023-01-18 17:19:43 -05:00
parent eb01bb2829
commit 6cb1ad2e5d
3 changed files with 126 additions and 11 deletions

View File

@@ -431,6 +431,13 @@ description: circlular geometry.
*uses:* data_1=tolorence
**nut_holder**
*description:* nut holder
*uses:* size_x=top diameter or x size in mm, size_y=bottom diameter or y size in mm, size_z=holder height in mm, data_0="m2" or "m2.5" or "m3" or "m4", data_1="default" or "sloped" or "trap"
#### Sub class only “types”

View File

@@ -907,18 +907,22 @@ accessory_data = [
"model","vent_panel_hex",144,11.77,64,"top",[0,90,0],["case",false,false,false],62,107.43,3,5.0,1.6,"y",14, // model vent cover
"platter","vent_panel_hex",-200,13.77,0,"top",[0,0,0],["case",false,false,false],62,107.43,3,5.0,1.6,"y",14, // model vent cover
"suball","rectangle",111,26.77,64,"top",[0,90,0],["case",true,false,false],62,77.43,4,0,0,"",[2,2,2,2], // vent opening
"sub","round",111,16.57,57,"top",[0,90,0],["case",true,false,false],9,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,16.57,9,"bottom",[0,90,0],["case",true,false,false],9,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,114.4,57,"top",[0,90,0],["case",true,false,false],9,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,114.4,9,"bottom",[0,90,0],["case",true,false,false],9,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,16.57,57,"top",[0,90,0],["case",true,false,false],7,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,16.57,9,"bottom",[0,90,0],["case",true,false,false],7,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,114.4,57,"top",[0,90,0],["case",true,false,false],7,0,4,0,0,"",0, // vent cover screw hole
"sub","round",111,114.4,9,"bottom",[0,90,0],["case",true,false,false],7,0,4,0,0,"",0, // vent cover screw hole
"sub","round",3.81,17.78,35,"top",[0,0,0],["sbc-case_z",true,true,true],6.5,0,19,0,0,"",0, // sub screw hole
"sub","round",3.81,106.19,35,"top",[0,0,0],["sbc-case_z",true,true,true],6.5,0,19,0,0,"",0, // sub screw hole
"sub","round",106.04,24.77,35,"top",[0,0,0],["sbc-case_z",true,true,true],6.5,0,19,0,0,"",0, // sub screw hole
"sub","round",106.04,106.2,35,"top",[0,0,0],["sbc-case_z",true,true,true],6.5,0,19,0,0,"",0, // sub screw hole
"add2","standoff",140,16.57,57,"top",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
"add2","standoff",140,16.57,9 ,"bottom",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
"add2","standoff",140,114.4,57,"top",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
"add2","standoff",140,114.4,9 ,"bottom",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
"add2","nut_holder",144,16.57,57,"top",[0,270,0],["case",false,false,false],8,16,5,"m3","sloped",0,0, // vent cover nut holder
"add2","nut_holder",144,16.57,9 ,"bottom",[0,270,0],["case",false,false,false],8,16,5,"m3","sloped",0,0, // vent cover nut holder
"add2","nut_holder",144,114.4,57,"top",[0,270,0],["case",false,false,false],8,16,5,"m3","sloped",0,0, // vent cover nut holder
"add2","nut_holder",144,114.4,9 ,"bottom",[0,270,0],["case",false,false,false],8,16,5,"m3","sloped",0,0, // vent cover nut holder
// "add2","standoff",140,16.57,57,"top",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
// "add2","standoff",140,16.57,9 ,"bottom",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
// "add2","standoff",140,114.4,57,"top",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
// "add2","standoff",140,114.4,9 ,"bottom",[0,90,0],["case",false,false,false],0,0,0,0,0,0,[10,4,3.2,10,2.5,3,1,0,0,0,0], // vent cover nut holder
"sub","rectangle",-4,100.5,3,"top",[0,0,0],["sbc-case_z",true,true,true],14,4,20,0,0,"",[1,1,1,1], // sub rectangle
"sub","rectangle",100.5,17,30,"top",[0,0,0],["sbc-case_z",true,true,true],9,4,10,0,0,"",[1,1,1,1], // sub rectangle
"model","standoff",78,127,8.65,"top",[-90,0,0],["case",false,false,true],0,0,0,0,0,0,[5.75,10,3.2,10,0.01,0,0,1,0,0,0], // standoff

View File

@@ -51,7 +51,8 @@
20221207 version 2.0.3 added double_stacked_usb3-usb2, hd35_vtab(side) and supporting code
2023xxxx version 2.0.x added h3_port_extender(style, mask = false), hk_pwr_button(mask = false), keyhole(keysize, mask = false),
vent_hex(cells_x, cells_y, cell_size, cell_spacing, orientation) and supporting code, dsub(dsubsize, mask = false),
vent_panel_hex(x, y, thick, cell_size, cell_spacing, border, borders),
vent_panel_hex(x, y, thick, cell_size, cell_spacing, border, borders),
added nut_holder(nut, style, dia_x, dia_y, height)
see https://github.com/hominoids/SBC_Case_Builder
@@ -125,8 +126,10 @@
hk_pwr_button(mask = false)
keyhole(keysize, mask = false)
vent_hex(cells_x, cells_y, cell_size, cell_spacing, orientation)
dsub(dsubsize, mask = false)
vent_panel_hex(x, y, thick, cell_size, cell_spacing, border, borders);
dsub(dsubsize, mask = false)
nut_holder(nut, style, dia_x, dia_y, height)
*/
use <./lib/fillets.scad>;
@@ -267,7 +270,8 @@ module add(type,loc_x,loc_y,loc_z,face,rotation,size_x,size_y,size_z,data_1,data
translate([loc_x,loc_y,loc_z]) rotate(rotation) fan_cover(size_x, size_z);
}
if(type == "vent_panel_hex") {
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent_panel_hex(x=size_x, y=size_y, thick=size_z, cell_size=data_1, cell_spacing=data_2, border=data_4, borders=data_3);
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent_panel_hex(x=size_x, y=size_y, thick=size_z,
cell_size=data_1, cell_spacing=data_2, border=data_4, borders=data_3);
}
if(type == "feet") {
translate([loc_x,loc_y,loc_z]) rotate(rotation) feet(size_x, size_z);
@@ -293,6 +297,9 @@ module add(type,loc_x,loc_y,loc_z,face,rotation,size_x,size_y,size_z,data_1,data
if(type == "dsub") {
translate([loc_x,loc_y,loc_z]) rotate(rotation) dsub(data_4);
}
if(type == "nut_holder") {
translate([loc_x,loc_y,loc_z]) rotate(rotation) nut_holder(data_1, data_2, size_x, size_y, size_z);
}
}
@@ -3767,3 +3774,100 @@ module dsub(dsubsize, mask = false) {
}
}
}
//
// nut_holder(nut, style, dia_x, dia_y, height)
// nut = "m2", "m2.5", "m3", "m4"
// style = "default", "sloped", "trap"
// dia_x = top diameter or x size in mm
// dia_y = bottom diameter or y size in mm
// height = holder height in mm
//
module nut_holder(nut, style, dia_x, dia_y, height) {
nuts = [[2,4,1.6], // m2 size, diameter, height
[2.5,5,2], // m2.5 size, diameter, height
[3,5.5,2.4], // m3 size, diameter, height
[4,7,3.2]]; // m4 size, diameter, height
$fn = 180;
if( style == "default") {
difference() {
cylinder(d=dia_x, h=height);
if(nut == "m2") {
translate([0, 0, -1]) cylinder(d=nuts[0][0]+.25, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[0][1]*2/sqrt(3), h=height, $fn=6);
}
if(nut == "m2.5") {
translate([0, 0, -1]) cylinder(d=nuts[1][0]+.25, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[1][1]*2/sqrt(3), h=height, $fn=6);
}
if(nut == "m3") {
translate([0, 0, -1]) cylinder(d=nuts[2][0]+.5, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[2][1]*2/sqrt(3), h=height, $fn=6);
}
if(nut == "m4") {
translate([0, 0, -1]) cylinder(d=nuts[3][0]+.5, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[3][1]*2/sqrt(3), h=height, $fn=6);
}
}
}
if( style == "sloped") {
difference() {
cylinder(d2=dia_x, d1=dia_y, h=height);
if(nut == "m2") {
translate([0, 0, -1]) cylinder(d=nuts[0][0]+.25, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[0][1]*2/sqrt(3), h=height, $fn=6);
}
if(nut == "m2.5") {
translate([0, 0, -1]) cylinder(d=nuts[1][0]+.25, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[1][1]*2/sqrt(3), h=height, $fn=6);
}
if(nut == "m3") {
translate([0, 0, -1]) cylinder(d=nuts[2][0]+.5, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[2][1]*2/sqrt(3), h=height, $fn=6);
}
if(nut == "m4") {
translate([0, 0, -1]) cylinder(d=nuts[3][0]+.5, h=height+2);
translate([0, 0, 2]) cylinder(d=nuts[3][1]*2/sqrt(3), h=height, $fn=6);
}
}
}
if( style == "trap") {
if(nut == "m2") {
difference() {
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
translate([0, 0, -1]) cylinder(d=nuts[0][0]+.25, h=height+2);
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[0][1]*2/sqrt(3), h=nuts[0][2], $fn=6);
translate([-nuts[0][1]/2, 0, 2]) cube([nuts[0][1], dia_x, nuts[0][2]]);
}
}
if(nut == "m2.5") {
difference() {
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
translate([0, 0, -1]) cylinder(d=nuts[1][0]+.325, h=height+2);
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[1][1]*2/sqrt(3), h=nuts[1][2], $fn=6);
translate([-nuts[1][1]/2, 0, 2]) cube([nuts[1][1], dia_x, nuts[1][2]]);
}
}
if(nut == "m3") {
difference() {
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
translate([0, 0, -1]) cylinder(d=nuts[2][0]+.5, h=height+2);
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[2][1]*2/sqrt(3), h=nuts[2][2], $fn=6);
translate([-nuts[2][1]/2, 0, 2]) cube([nuts[2][1], dia_x, nuts[2][2]]);
}
}
if(nut == "m4") {
difference() {
translate([-dia_x/2, -dia_y/2, 0]) cube([dia_x, dia_y, height]);
translate([0, 0, -1]) cylinder(d=nuts[3][0]+.5, h=height+2);
translate([0, 0, 2]) rotate([0,0,30]) cylinder(d=nuts[3][1]*2/sqrt(3), h=nuts[3][2], $fn=6);
translate([-nuts[3][1]/2, 0, 2]) cube([nuts[3][1], dia_x, nuts[3][2]]);
}
}
}
}