Skip to content

Instantly share code, notes, and snippets.

@ednisley
Created June 5, 2026 22:47
Show Gist options
  • Select an option

  • Save ednisley/0df0d3ad680980780965213d3f5d4539 to your computer and use it in GitHub Desktop.

Select an option

Save ednisley/0df0d3ad680980780965213d3f5d4539 to your computer and use it in GitHub Desktop.
OpenSCAD source code: Brackets to mount an outlet strip on a workbench
// Shower soap dish
// Ed Nisley - KE4ZNU
// 2026-06-04
include <BOSL2/std.scad>
Layout = "Show"; // [Show,Build]
/* [Hidden] */
HoleWindage = 0.2;
Protrusion = 0.1;
NumSides = 3*3*4;
Gap = 10.0/2;
$fn=NumSides;
ID = 0;
OD = 1;
LENGTH = 2;
BenchThick = 21.0; // workbench top
ScrewOD = 4.0; // into edge of bench
Insert = [4.0,5.5,10.0]; // robust M4 insert
WallThick = 10.0;
BaseThick = 10.0;
OutletBase = [15.0,40.0];
HoleOffset = 6.5; // from outside edge of bracket
HoleOC = 24.0;
MountOA = [OutletBase.x,OutletBase.y,BenchThick + Insert[LENGTH] + 1.0 + BaseThick];
//----------
// Build it
module Mount() {
difference() {
cuboid(MountOA,rounding=1.0,anchor=BOTTOM + BACK);
up(BaseThick)
fwd(WallThick)
cuboid([2*MountOA.x,MountOA.y,BenchThick],anchor=BOTTOM + BACK);
up(BaseThick + BenchThick/2) back(Protrusion)
ycyl(OutletBase.y,d=ScrewOD,circum=true,$fn=6,anchor=BACK);
for (j=[-1,1])
fwd(MountOA.y/2 + j*HoleOC/2)
right(HoleOffset - MountOA.x/2)
up(MountOA.z + Protrusion)
cyl(Insert[LENGTH],d=Insert[OD],circum=true,$fn=6,anchor=TOP);
}
}
//----------
// Build it
if (Layout == "Show") {
left(Gap + MountOA.x/2)
Mount();
right(Gap + MountOA.x/2)
xflip() Mount(); // mirror for the other end of the outlet strip
}
if (Layout == "Build") {
left(MountOA.z/2)
up(MountOA.x/2)
yrot(90)
Mount();
fwd(1.5*MountOA.y)
left(MountOA.z/2 - BenchThick/2 - Insert[LENGTH]/2)
zrot(180)
up(MountOA.x/2)
yrot(-90)
xflip() Mount(); // mirror for the other end of the outlet strip
}
@ednisley

ednisley commented Jun 5, 2026

Copy link
Copy Markdown
Author

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