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:
http://forum.openscad.org/file/n15260/democurvedlogo.png
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(lenght2+0.2,diameter/2,diameter/2,center=false);
}
// create a 3D logo with height diameter2
translate([0,0,diameter])
resize([lenght, lenght, diameter])
surface(file = "logob.png", center = true, invert=true,
convexity = 5);
}
}
--
View this message in context: http://forum.openscad.org/a-curve-logo-tp15260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Good approach! If there was a function importing data into a matrix, one
could do really crazy things!
--
View this message in context: http://forum.openscad.org/a-curve-logo-tp15260p15261.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On Dec 21, 2015, at 07:57 AM, Johan Jonker johangjonker@zonnet.nl 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/1110
There are also external tools for this:
http://aggregate.org/MAKE/TRACE2SCAD/
http://chaaawa.com/stencil_factory_js/
-Marius
That right it is very slow. It helped when I reduced the complexity of the
logo and first made and slt file of the logo, simplified it using Meshlab
and then import it.
Here is the result:
http://forum.openscad.org/file/n15263/barrel_met_logo.png
--
View this message in context: http://forum.openscad.org/a-curve-logo-tp15260p15263.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Looks good. Another approach is to use Inkscape and its tools, to vectorise
your bitmap, and then export to openSCAD using a special extension.
--
View this message in context: http://forum.openscad.org/a-curve-logo-tp15260p15270.html
Sent from the OpenSCAD mailing list archive at Nabble.com.