Add foot option to CR_BOX

This commit is contained in:
Kienan Stewart 2025-08-05 20:53:26 -04:00
parent 6efc25d0fc
commit 9ac1747e51
1 changed files with 71 additions and 43 deletions

View File

@ -1,3 +1,13 @@
/*
Originally by ThatDude7Piglets is licensed under the Creative Commons - Attribution - Non-Commercial - Share Alike license.
https://www.thingiverse.com/thing:6072539
Additions:
* optional foot
*/
/* [Filter] */ /* [Filter] */
filterThiccness = 100.0; //mm filterThiccness = 100.0; //mm
@ -12,6 +22,13 @@ insideCornerStyle = 2; //[0:Cut Corner, 1:Don't cut corner, 2:Rounded corner]
/* [OpenSCAD] [Settings] */ /* [OpenSCAD] [Settings] */
$fn = 100; $fn = 100;
/* [Foot] */
footEnable = 0; //[0:Disable, 1:Enable]
footShape = 0; //[0:Cylinder, 1:Square]
footDepth = 10; //mm
footWidth = 54; //mm
footInset = 0; //mm
module filter(filterDimensions = [100, 1000, 1000]){ module filter(filterDimensions = [100, 1000, 1000]){
cube(filterDimensions); cube(filterDimensions);
} }
@ -41,4 +58,15 @@ mirror([mirrored? 1 : 0, 0, 0]){
} }
} }
} }
if(footEnable == 1) {
translate([pieceDimensions[0]/2 - footInset, pieceDimensions[1]/2 - footInset, -footDepth/2 - pieceWallThiccness]) {
if (footShape == 0) {
cylinder(footDepth, footWidth, footWidth, center=true);
}
else {
cube([footWidth*2, footWidth*2, footDepth], center=true);
}
}
}
} }