discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Scad file for Cylindrical lamp shade

M
MichaelAtOz
Mon, Aug 1, 2016 6:30 AM

dubbsd wrote

I am a newbie to this.
I want to create a cylindrical lithograph lamp shade with multiple
pictures. (4or 5 pictures per shade).
I want to set the diameter of the Cylinder, height of the cylinder, max
thickness, and thinnest thickness.
Any help on this would be appreciated.

Thanks
Dale

I'd suggest starting with something less ambitious.
Read the  manual https://en.wikibooks.org/wiki/OpenSCAD_User_Manual  ,
checkout the examples, then understand the lithophane OpenSCAD code on
Thingiverse here http://www.thingiverse.com/thing:74322  and  here
http://www.thingiverse.com/thing:78719  .

Or maybe just try  this http://www.thingiverse.com/thing:1181437  .


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Scad-file-for-Cylindrical-lamp-shade-tp18009p18010.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

dubbsd wrote > I am a newbie to this. > I want to create a cylindrical lithograph lamp shade with multiple > pictures. (4or 5 pictures per shade). > I want to set the diameter of the Cylinder, height of the cylinder, max > thickness, and thinnest thickness. > Any help on this would be appreciated. > > Thanks > Dale I'd suggest starting with something less ambitious. Read the manual <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual> , checkout the examples, then understand the lithophane OpenSCAD code on Thingiverse here <http://www.thingiverse.com/thing:74322> and here <http://www.thingiverse.com/thing:78719> . Or maybe just try this <http://www.thingiverse.com/thing:1181437> . ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Scad-file-for-Cylindrical-lamp-shade-tp18009p18010.html Sent from the OpenSCAD mailing list archive at Nabble.com.
FV
Frank van der Hulst
Mon, Aug 1, 2016 6:55 AM

Should be quite straightforward.

Create a single JPG or PNG with all your images in the appropriate places
to wrap around the cylinder.

Then go to  Thingiverse and search for my item "openscad wrap image curved
surface". Sorry, I can't figure out how to get a hyperlink on my phone.
You'll also need Python. Use Python to generate a. Scad file, then openscad
to make an STL.

On 1/08/2016 18:31, "MichaelAtOz" oz.at.michael@gmail.com wrote:

dubbsd wrote

I am a newbie to this.
I want to create a cylindrical lithograph lamp shade with multiple
pictures. (4or 5 pictures per shade).
I want to set the diameter of the Cylinder, height of the cylinder, max
thickness, and thinnest thickness.
Any help on this would be appreciated.

Thanks
Dale

I'd suggest starting with something less ambitious.
Read the  manual https://en.wikibooks.org/wiki/OpenSCAD_User_Manual  ,
checkout the examples, then understand the lithophane OpenSCAD code on
Thingiverse here http://www.thingiverse.com/thing:74322  and  here
http://www.thingiverse.com/thing:78719  .

Or maybe just try  this http://www.thingiverse.com/thing:1181437  .


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context:
http://forum.openscad.org/Scad-file-for-Cylindrical-lamp-shade-tp18009p18010.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Should be quite straightforward. Create a single JPG or PNG with all your images in the appropriate places to wrap around the cylinder. Then go to Thingiverse and search for my item "openscad wrap image curved surface". Sorry, I can't figure out how to get a hyperlink on my phone. You'll also need Python. Use Python to generate a. Scad file, then openscad to make an STL. On 1/08/2016 18:31, "MichaelAtOz" <oz.at.michael@gmail.com> wrote: > dubbsd wrote > > I am a newbie to this. > > I want to create a cylindrical lithograph lamp shade with multiple > > pictures. (4or 5 pictures per shade). > > I want to set the diameter of the Cylinder, height of the cylinder, max > > thickness, and thinnest thickness. > > Any help on this would be appreciated. > > > > Thanks > > Dale > > I'd suggest starting with something less ambitious. > Read the manual <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual> , > checkout the examples, then understand the lithophane OpenSCAD code on > Thingiverse here <http://www.thingiverse.com/thing:74322> and here > <http://www.thingiverse.com/thing:78719> . > > Or maybe just try this <http://www.thingiverse.com/thing:1181437> . > > > > ----- > Admin - PM me if you need anything, or if I've done something stupid... > > Unless specifically shown otherwise above, my contribution is in the > Public Domain; to the extent possible under law, I have waived all > copyright and related or neighbouring rights to this work. Obviously > inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! > http://www.ourfairdeal.org/ time is running out! > -- > View this message in context: > http://forum.openscad.org/Scad-file-for-Cylindrical-lamp-shade-tp18009p18010.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
AD
Ari Diacou
Tue, Aug 2, 2016 11:28 AM

It's going to look something like this:
(this code will not work as written)

files=["image1.png","image2.png","image3.png","image4.png"]; //all of these
files MUST be png, and MUST be in the same directory as your scad file
height=//height of lampshade
radius=//radius of lampshade
thickness=//thickness of the lampshade
inner_radius=radius-thickness;
translucency=// a range from 0-1.01 which will change the thickness of
relief of the images, depending on if you want a lithophane or a cutout

difference (){
cylinder1();//outer cone
cylinder2();//inner cone
for(i=[0:len(files)-1]){
translate()//center the image
rotate([90+atan(height/radius),0,i360/num_images]) //rotates
the image from facing up to facing normal to the lampshade, and rotates the
images around the z axis
resize([,,thickness
translucency])
surface(file=files[i]);
}

That should get you started. If you cant do it, I'll write it up and put it
up on thingiverse.

On Mon, Aug 1, 2016 at 2:55 AM, Frank van der Hulst <drifter.frank@gmail.com

wrote:

Should be quite straightforward.

Create a single JPG or PNG with all your images in the appropriate places
to wrap around the cylinder.

Then go to  Thingiverse and search for my item "openscad wrap image curved
surface". Sorry, I can't figure out how to get a hyperlink on my phone.
You'll also need Python. Use Python to generate a. Scad file, then openscad
to make an STL.

On 1/08/2016 18:31, "MichaelAtOz" oz.at.michael@gmail.com wrote:

dubbsd wrote

I am a newbie to this.
I want to create a cylindrical lithograph lamp shade with multiple
pictures. (4or 5 pictures per shade).
I want to set the diameter of the Cylinder, height of the cylinder, max
thickness, and thinnest thickness.
Any help on this would be appreciated.

Thanks
Dale

I'd suggest starting with something less ambitious.
Read the  manual https://en.wikibooks.org/wiki/OpenSCAD_User_Manual  ,
checkout the examples, then understand the lithophane OpenSCAD code on
Thingiverse here http://www.thingiverse.com/thing:74322  and  here
http://www.thingiverse.com/thing:78719  .

Or maybe just try  this http://www.thingiverse.com/thing:1181437  .


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context:
http://forum.openscad.org/Scad-file-for-Cylindrical-lamp-shade-tp18009p18010.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

It's going to look something like this: (this code will not work as written) files=["image1.png","image2.png","image3.png","image4.png"]; //all of these files MUST be png, and MUST be in the same directory as your scad file height=//height of lampshade radius=//radius of lampshade thickness=//thickness of the lampshade inner_radius=radius-thickness; translucency=// a range from 0-1.01 which will change the thickness of relief of the images, depending on if you want a lithophane or a cutout difference (){ cylinder1();//outer cone cylinder2();//inner cone for(i=[0:len(files)-1]){ translate()//center the image rotate([90+atan(height/radius),0,i*360/num_images]) //rotates the image from facing up to facing normal to the lampshade, and rotates the images around the z axis resize([,,thickness*translucency]) surface(file=files[i]); } That should get you started. If you cant do it, I'll write it up and put it up on thingiverse. On Mon, Aug 1, 2016 at 2:55 AM, Frank van der Hulst <drifter.frank@gmail.com > wrote: > Should be quite straightforward. > > Create a single JPG or PNG with all your images in the appropriate places > to wrap around the cylinder. > > Then go to Thingiverse and search for my item "openscad wrap image curved > surface". Sorry, I can't figure out how to get a hyperlink on my phone. > You'll also need Python. Use Python to generate a. Scad file, then openscad > to make an STL. > > On 1/08/2016 18:31, "MichaelAtOz" <oz.at.michael@gmail.com> wrote: > >> dubbsd wrote >> > I am a newbie to this. >> > I want to create a cylindrical lithograph lamp shade with multiple >> > pictures. (4or 5 pictures per shade). >> > I want to set the diameter of the Cylinder, height of the cylinder, max >> > thickness, and thinnest thickness. >> > Any help on this would be appreciated. >> > >> > Thanks >> > Dale >> >> I'd suggest starting with something less ambitious. >> Read the manual <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual> , >> checkout the examples, then understand the lithophane OpenSCAD code on >> Thingiverse here <http://www.thingiverse.com/thing:74322> and here >> <http://www.thingiverse.com/thing:78719> . >> >> Or maybe just try this <http://www.thingiverse.com/thing:1181437> . >> >> >> >> ----- >> Admin - PM me if you need anything, or if I've done something stupid... >> >> Unless specifically shown otherwise above, my contribution is in the >> Public Domain; to the extent possible under law, I have waived all >> copyright and related or neighbouring rights to this work. Obviously >> inclusion of works of previous authors is not included in the above. >> >> The TPP is no simple “trade agreement.” Fight it! >> http://www.ourfairdeal.org/ time is running out! >> -- >> View this message in context: >> http://forum.openscad.org/Scad-file-for-Cylindrical-lamp-shade-tp18009p18010.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >