Skip to content

Instantly share code, notes, and snippets.

@ednisley
Created March 30, 2025 13:56
Show Gist options
  • Save ednisley/36c02064d6be5304d75886222892ecee to your computer and use it in GitHub Desktop.
Save ednisley/36c02064d6be5304d75886222892ecee to your computer and use it in GitHub Desktop.
OpenSCAD source code: Holder for floor lamp remote control
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Floor Lamp Remote Holder
// Ed Nisley - KE4ZNU
// 2025-03-29
include <BOSL2/std.scad>
Layout = "Holder"; // [Show,Build,Remote,Holder]
BaseAngle = 30; // [0:50]
/* [Hidden] */
RemoteOA = [92.0,40.0,14.5];
PoleOD = 16.0; // lamp pole
MagnetOD = 20.0; // steel plate under magnet
MagnetOffset = [11.0,0,-2.0];
TapeThick = 1.2;
HolderOA = [60.0,35.0,PoleOD/3 + 4.0 + RemoteOA.z/2];
HolderRadius = 5.0;
Gap = 10.0;
//----------
// Define shapes
module RemoteBody() {
union() {
intersection() {
fwd(RemoteOA.y/2) up(RemoteOA.z/2)
linear_extrude(h=RemoteOA.z,center=true)
import("Floor Lamp Remote - outlines.svg",layer="Top Outline");
zrot(90) xrot(90)
linear_extrude(h=RemoteOA.x,center=true)
import("Floor Lamp Remote - outlines.svg",layer="End Outline");
xrot(90)
linear_extrude(h=RemoteOA.y,center=true)
import("Floor Lamp Remote - outlines.svg",layer="Side Outline");
}
translate(MagnetOffset)
cylinder(d=MagnetOD,h=RemoteOA.z,$fn=4*3*4);
}
}
module Holder() {
difference() {
cuboid(HolderOA,anchor=BOTTOM,rounding=HolderRadius,except=TOP);
down((PoleOD + 2*TapeThick)*(1/2 - 1/3))
yrot(90)
cylinder(d=PoleOD + 2*TapeThick,h=2*HolderOA.x,center=true);
up(HolderOA.z - RemoteOA.z/2)
RemoteBody();
}
}
//----------
// Build things
if (Layout == "Remote")
RemoteBody();
if (Layout == "Holder")
Holder();
if (Layout == "Show") {
color("White")
Holder();
color("Gray",0.75)
up(HolderOA.z - RemoteOA.z/2 + Gap)
RemoteBody();
color("Green",0.5)
down((PoleOD + 2*TapeThick)*(1/2 - 1/3))
yrot(90)
cylinder(d=PoleOD + 2*TapeThick,h=2*HolderOA.x,center=true);
}
if (Layout == "Build") {
Holder();
}
@ednisley
Copy link
Author

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