Skip to content

Instantly share code, notes, and snippets.

@ednisley
Created February 23, 2022 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ednisley/c2ec09f1299f45bbe19d55aa87fae324 to your computer and use it in GitHub Desktop.
Save ednisley/c2ec09f1299f45bbe19d55aa87fae324 to your computer and use it in GitHub Desktop.
OpenSCAD source code: caddy brackets for ShopVac handle
// ShopVac Nozzle Caddy
// Ed Nisley KE4ZNU 2022-02
Layout = "Show"; // [Handle,Block,Show,Build]
HandleOD = 20.0;
//- Extrusion parameters must match reality!
/* [Hidden] */
ThreadThick = 0.25;
ThreadWidth = 0.40;
HoleWindage = 0.2;
Protrusion = 0.1; // make holes end cleanly
inch = 25.4;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
ID = 0;
OD = 1;
LENGTH = 2;
//----------
// Dimensions
// Handle lies along X axis
Handle = [200,HandleOD,HandleOD]; // X = longer than anything else
WallThick = 5.0; // Thinnest printed wall
Screw = [4.0,7.0,25.0]; // M4 socket head cap screw
Washer = [4.5,9.0,0.8]; // M4 washer
Insert = [4.0,5.9,10.0]; // M4 brass insert
Block = [15.0,Handle.y + 4*WallThick + 2*Screw[ID],HandleOD + 2*WallThick]; // overall clamp block
echo(str("Block: ",Block));
Bosses = [[Block.x,9.5,13.0],[Block.x,15.0,9.0]];
ScrewOC = Handle.y + 2*WallThick + Screw[ID];
Kerf = 1.0; // cut through middle to apply compression
Gap = 1.25;
CornerRadius = Washer[OD]/2;
//----------------------
// Useful routines
module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
FixDia = Dia / cos(180/Sides);
cylinder(d=(FixDia + HoleWindage),h=Height,$fn=Sides);
}
// Shopvac handle
module Handle() {
rotate([0,90,0])
translate([0,0,-Handle.x/2])
rotate(180/(4*8))
PolyCyl(Handle.y,Handle.x,4*8);
}
// Clamp block
module ClampBlock(BossID=0) {
difference() {
union() {
hull()
for (i=[-1,1], j=[-1,1]) // rounded block
translate([i*(Block.x/2 - CornerRadius),j*(Block.y/2 - CornerRadius),-Block.z/2])
cylinder(r=CornerRadius,h=Block.z,$fn=8);
translate([0,0,-(Block.z/2 + Bosses[BossID].z/2 - Protrusion)])
cube(Bosses[BossID],center=true);
}
for (j = [-1,1]) // screw holes
translate([0,j*ScrewOC/2,-(Block.z/2 + Protrusion)])
rotate(180/6)
PolyCyl(Screw[ID],Block.z + 2*Protrusion,6);
cube([2*Block.x,2*Block.y,Kerf],center=true);
Handle();
translate([0,0,-Block.z])
rotate(180/6)
PolyCyl(Screw[ID],Block.z,6);
translate([0,0,-(Handle.z/2 + Insert[LENGTH])])
rotate(180/6)
PolyCyl(Insert[OD],Handle.y,6);
}
}
// Splice block less handle bore
module ShapedBlock() {
difference() {
ClampBlock();
Handle();
}
}
//----------
// Build them
if (Layout == "Handle")
Handle();
if (Layout == "Block")
ClampBlock(BossID=0);
if (Layout == "Show") {
color("Green",0.25)
Handle();
xofs = -((len(Bosses) - 1)/2 * Gap*Block.x);
for (i=[0:len(Bosses) - 1])
translate([xofs + i*Gap*Block.x,0,0])
ClampBlock(i);
}
if (Layout == "Build") {
yofs = -((len(Bosses) - 1)/2 * Gap*Block.y);
for (j=[0:len(Bosses) - 1])
translate([0,yofs + j*Gap*Block.y,0])
translate([0,0,Block.x/2])
rotate([0,90,0])
ClampBlock(j);
}
@ednisley
Copy link
Author

More details on my blog at https://wp.me/poZKh-aIu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment