# a curve logo

5 messages
Open this post in threaded view
|

## a curve logo

 I like to have a handwritten logo in my 3D printed objects. With surface it is possible to convert a png file into a 3D logo that you can add or substract from flat surfaces. But I liked to have to logo on a curved object. So I made a curved logo in this way: The code is as follows: //------------------------------------------------ // module to make a curved logo from a png file //------------------------------------------------ curvedlogo(20,20); module curvedlogo(diameter,lenght) {         \$fn=60;         translate([0,0,-diameter/2])     intersection()         {             // create a tube with 2* lenght and diameter             difference()             {                 rotate(90,[1,0,0])                   translate([0,0,-lenght])                     cylinder(lenght*2,diameter/2+4,diameter/2+4,center=false);                 rotate(90,[1,0,0])                     translate([0,0,-lenght-0.1])                         cylinder(lenght*2+0.2,diameter/2,diameter/2,center=false);             }             // create a 3D logo with height diameter*2             translate([0,0,diameter])             resize([lenght, lenght, diameter])             surface(file = "logob.png", center = true, invert=true, convexity = 5);             } }
Open this post in threaded view
|

## Re: a curve logo

 Good approach! If there was a function importing data into a matrix, one could do really crazy things!
Open this post in threaded view
|

## Re: a curve logo

 Administrator In reply to this post by Johan Jonker > On Dec 21, 2015, at 07:57 AM, Johan Jonker <[hidden email]> wrote: > > I like to have a handwritten logo in my 3D printed objects. > With surface it is possible to convert a png file into a 3D logo that you > can add or substract from flat surfaces. But I liked to have to logo on a > curved object. surface() tends to be very slow. A better approach would be to trace the png into a vector outline. We’re working on such a built-in function, see here: https://github.com/openscad/openscad/pull/1110There are also external tools for this: http://aggregate.org/MAKE/TRACE2SCAD/http://chaaawa.com/stencil_factory_js/ -Marius _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org