From 61781aa7eb8345b0ac7ea0366779affc2bd6dfd8 Mon Sep 17 00:00:00 2001 From: Jan Seidl Date: Sun, 10 Apr 2022 11:16:55 +0200 Subject: [PATCH] second version of lampshades and separate nut --- README.md | 20 +++++++++++++++++--- lampshade_conical.scad | 8 ++------ lampshade_curved.scad | 19 +++++++------------ nut.scad | 30 ++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 21 deletions(-) create mode 100644 nut.scad diff --git a/README.md b/README.md index d1c527d..9cf8758 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,27 @@ # lampshades models -My lampshade on the Ikea lamp is similar to [HEKTOGRAM](https://www.ikea.com/cz/cs/p/hektogram-stojaci-cteci-lampa-stribrna-bila-80477710/) was broken. I thought about buying a new light, but I wouldn't say I like the latest version of the lamp, and I'm a happy owner of a 3D printer. +My lampshade on the Ikea lamp is similar to [HEKTOGRAM](https://www.ikea.com/cz/cs/p/hektogram-stojaci-cteci-lampa-stribrna-bila-80477710/) was broken. As a owner of 3D printing I tried to make new lapmshade. I have two versions of lampshades; both are made in amazing [OpenSCAD](https://openscad.org) and are fully customizable. The first model which I made is `lampshade_conical.scad`. That was the easier one. But I wanted to have the lampshade more curved, so I did the second model, `lampshade_curved.scad`. -Configuration of the `lampshade_conical` is pretty simple, and the second is more complex - you need to play with `curved_factor` to find a proper design and height. +Configuration of the `lampshade_conical` is pretty simple, and the second is a little bit complex - you need to play with `curved_factor` to find a proper design and height. -And btw. I lost the nut for the lampshade. That is the reason why my models contain nuts. If you don't want nut—comment `nut` line. +And btw. I lost the nut for the lampshade. + +My first models contain nuts as part of lampshade, but it wasn't a good design, so I made a separate `./nut.scad` again - fully customizable. + +Thanks to decision to separate lampshade and nut (the original set up of the lamp btw.) I'm fully flexible. I wish you a lot of fun with modeling (and printing). + +## how to install dependencies for nut? +I use [threadlib](https://github.com/adrianschlatter/threadlib) + +you need to install (download or checkout) to the [OpenSCAD library folder](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries) +those repositories: +* [threadlib](https://github.com/adrianschlatter/threadlib) +* [scad-utils](https://github.com/openscad/scad-utils) +* [list-compohension](https://github.com/openscad/list-comprehension-demos) +* [thread_profile.scad](https://github.com/MisterHW/IoP-satellite/blob/master/OpenSCAD%20bottle%20threads/thread_profile.scad) diff --git a/lampshade_conical.scad b/lampshade_conical.scad index 4d70966..45f9852 100644 --- a/lampshade_conical.scad +++ b/lampshade_conical.scad @@ -1,7 +1,5 @@ -use - height = 110; -bottom_d = 70; +bottom_d = 44; top_d = 170; facets = 40; @@ -13,6 +11,4 @@ difference() { cylinder(height, bottom_r, top_r, $fn=facets); translate([0,0,-0.01]) cylinder(height+0.02, bottom_r-thickness, top_r-thickness, $fn=facets); -} - -nut("M42x3", turns=2, Douter=bottom_d); \ No newline at end of file +} \ No newline at end of file diff --git a/lampshade_curved.scad b/lampshade_curved.scad index 7a0da82..ab97325 100644 --- a/lampshade_curved.scad +++ b/lampshade_curved.scad @@ -1,28 +1,23 @@ -use - -x = 250; +curved_factor = 79; thickness = 2; -top_d = 170; -bottom_d = 70; - +top_d = 179; +bottom_d = 44; difference() { - rotate_extrude($fn=100) + rotate_extrude($fn=200) difference() { - polygon(bowl(top_d,x)); - offset(-thickness) polygon(bowl(top_d+thickness,x)); + polygon(bowl(top_d/2,curved_factor)); + offset(-thickness) polygon(bowl(top_d/2+thickness,curved_factor)); }; cylinder(top_d, bottom_d/2, bottom_d/2); } -nut("M42x3", turns=2, Douter=bottom_d); - function point(i, R) = [ i, i*i/R ]; -function bowl(height, x_factor) = ( +function bowl(height, x) = ( concat( [ for (i = [0:1:height]) point(i, x) ], [[0,height*height/x]] diff --git a/nut.scad b/nut.scad new file mode 100644 index 0000000..0661f4a --- /dev/null +++ b/nut.scad @@ -0,0 +1,30 @@ +use + +turns = 2; +bottom_d = 70; +diameter = 42; +len_between_threads = 3; +holder_height = 5; +holder_weight = 5; +holders = 3; + +nut_type = str("M",diameter,"x",len_between_threads); + +height_of_nut = turns * len_between_threads; + +nut(nut_type, turns=turns, Douter=bottom_d); +difference() { + holders(); + + translate([0,0,height_of_nut-0.01]) + cylinder(holder_height+0.02, diameter/2, diameter/2); +} + +module holders() { + shift = 180 / holders; + + for(angle = [0:shift:360]) + translate([0,0,height_of_nut + holder_height/2]) + rotate(angle) + cube([holder_height,bottom_d,holder_weight], center=true); +}; \ No newline at end of file