Add experimental screwless PCB feet

If Screwless is true, use feet with a peg in them that goes through the
PCB holes. Feet then come down from the top shell to press against the
PCB and hold it in place. These have a hole in the center so the peg
from the bottom shell will insert into it and keep the shells in a
stable position in the X-Y plane. If you combine this with screwless
snap tabs, you can have a fully screwless box.
This commit is contained in:
Joel Ebel 2018-05-28 22:52:39 -04:00
parent 7280687162
commit 343af4fded

View File

@ -97,6 +97,8 @@ FootHeight = 8;
FootDia = 8; FootDia = 8;
// - Diamètre trou - Hole diameter // - Diamètre trou - Hole diameter
FootHole = 2.2606; // tap size for #4 coarse-thread FootHole = 2.2606; // tap size for #4 coarse-thread
// - EXPERIMENTAL Screwless design
Screwless = 0; // [0:Screws, 1:Screwless]
FootFilet = FootHeight/4; FootFilet = FootHeight/4;
// Foot centers are specified as distance from PCB top-left corner. // Foot centers are specified as distance from PCB top-left corner.
@ -497,6 +499,20 @@ module Holes(top=0) {
} }
module PCB() {
translate([0, 0, FootHeight]) {
cube([PCBLength, PCBWidth, PCBThick]);
translate([PCBLength/2, PCBWidth/2, PCBThick]) {
color("Olive") {
linear_extrude(height=FontThick) {
text("PCB", font="Arial black", halign="center", valign="center");
}
}
}
}
}
/* foot module /* foot module
Produces a single foot for PCB mounting. Produces a single foot for PCB mounting.
@ -505,14 +521,35 @@ module foot() {
color(Couleur1) { color(Couleur1) {
rotate_extrude($fn=100) { rotate_extrude($fn=100) {
difference() { difference() {
translate([FootHole/2 + CutoutMargin, 0, 0]) { union() {
square([(FootDia - FootHole)/2 - CutoutMargin + FootFilet, FootHeight]); if (Screwless && top) { // Foot with TopPCBMargin height
square([FootDia/2 + FootFilet, TopPCBMargin]);
}
else if (Screwless && !top) { // Foot for PCB peg
square([FootDia/2 + FootFilet, FootHeight + PCBThick*2]);
}
else if (!Screwless && !top) { // Foot with screw hole
translate([FootHole/2 + CutoutMargin, 0, 0]) {
square([(FootDia - FootHole)/2 - CutoutMargin + FootFilet, FootHeight]);
}
}
} }
translate([FootDia/2 + FootFilet, FootFilet, 0]) { translate([FootDia/2 + FootFilet, FootFilet, 0]) {
offset(r=FootFilet, $fn=Resolution) { offset(r=FootFilet, $fn=Resolution) {
square(FootHeight); square(Height);
} }
} }
if (Screwless && !top) { // Remove around peg
translate([FootHole/2 - PartMargin, FootHeight]) {
square([FootDia/2, PCBThick*3]);
}
}
if (Screwless && top) { // Remove hole for peg
translate([-FootHole/2, TopPCBMargin - PCBThick, 0]) {
square([(FootHole + CutoutMargin), PCBThick*2]);
}
}
} }
} }
} }
@ -527,32 +564,27 @@ module foot() {
No arguments are used, but parameters provide the PCB and foot dimensions. No arguments are used, but parameters provide the PCB and foot dimensions.
*/ */
module Feet() { module Feet(top=0) {
translate([BackEdgeMargin + Thick + PanelThick + PanelGap, LeftEdgeMargin + Thick, Thick]) { translate([BackEdgeMargin + Thick + PanelThick + PanelGap, LeftEdgeMargin + Thick, Thick]) {
/////////////// - PCB only visible in the preview mode - /////////////// /////////////// - PCB only visible in the preview mode - ///////////////
%translate([0, 0, FootHeight]) { if (!top) {
cube([PCBLength, PCBWidth, PCBThick]); %PCB();
translate([PCBLength/2, PCBWidth/2, PCBThick]) { }
color("Olive") {
linear_extrude(height=FontThick) {
text("PCB", font="Arial black", halign="center", valign="center");
}
}
}
} // Fin PCB
////////////////////////////// - 4 Feet - ////////////////////////////// ////////////////////////////// - 4 Feet - //////////////////////////////
translate([Foot1X, Foot1Y]) { if (Screwless || !top ) {
foot(); translate([Foot1X, Foot1Y]) {
} foot(top=top);
translate([Foot2X, Foot2Y]) {
foot();
} }
translate([Foot3X, Foot3Y]) { translate([Foot2X, Foot2Y]) {
foot(); foot(top=top);
}
translate([Foot3X, Foot3Y]) {
foot(top=top);
}
translate([Foot4X, Foot4Y]) {
foot(top=top);
} }
translate([Foot4X, Foot4Y]) {
foot();
} }
} // End main translate } // End main translate
} // Fin du module Feet } // Fin du module Feet
@ -570,6 +602,9 @@ module TopShell() {
union() { union() {
Coque(); Coque();
Tabs(top=1); Tabs(top=1);
if (Screwless && PCBFeet) {
Feet(top=1);
}
} }
Holes(top=1); Holes(top=1);
} }