terramir
Sent from my iPhone
Use InkScape to convert the B&W image to vectors and to generate an
OpenSCAD source file (there's an OpenSCAD plugin for InkScape).
In OpenSCAD scale, difference from the text and circle, then linear_extrude
to extrude the image to 3.6mm. Beware if your text contains holes (e.g.
letter o or e).
On Wed, Mar 18, 2020 at 8:14 AM r.d. terramir terramircomputers@gmail.com
wrote:
terramir
Sent from my iPhone
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I could be wrong, but I don't think there are any picture formats that can be
imported to OpenSCAD.
If I wanted to do that, I'd import it into Inkscape (free), trace it, and
then export it to svg format.
Unfortunately this only works for pictures that have a distinct outline. So,
the best thing to do is to look for svg files that are aready made. You can
also find maps that are silhouettes, which can be easily traced in inkscape.
As well, there are literally thousands, if not millions of files of pretty
much any subject you want, in SVG, PDF, EPS, and DXF format that can be
converted using online conversion sites.
Here's one from vectorstock.com that will easily trace in inkscape.
I loaded it into inkscape, traced the bitmap, broke the ppaths apart,
selected the box with text, deleted that, combined the paths again, and
saved it as an svg file. I then dragged and dropped the svg file into
OpenSCAD and did a 5mm linear_extrude.
linear_extrude(5)
import("J:/Downloads/20476754.svg");
http://forum.openscad.org/file/t2121/20476754.jpg
http://forum.openscad.org/file/t2121/20476754.png
--
Sent from: http://forum.openscad.org/
The idea presented to use Inkscape (or any vector program that traces, even
Lightburn) to trace out the bitmap is a solid valid approach. The extension
just makes things that much better. I've done this many times and learn a
bit more each time. Unfortunately, I forget more than I remember, so I get
to learn some things over again.
The reference to holes also is a consideration. The extension for Inkscape
creates a separate polygon path for each appropriate segment. One can pop a
comment it out and comment the line to identify it.
The remaining "islands" can be commented or # identified and pushed into a
difference environment if they are holes.
One thing I've found is the Inkscape extension dumps a scale factor that
isn't accurate/realistic and I change the value of the scale line to 1 to
get the size correct.
If the extension is used, experiment with the "force line output" of the
extension. One aspect of Inkscape trace is that you'll get a path for each
side of the stroke. In one setting, the walls of the OpenSCAD output are
stroke thickness with an empty middle, while the other setting generates a
solid shape. The solid shape method requires the above referenced difference
section if there are holes.
If you decide you don't like the extrusion thickness selected in the
Inkscape extension, that's also a value easily changed in the resulting
code.
You'll find different versions of this extension on Thingiverse. The most
recent has some peculiarities and I've been using "second from the top"
enough to want to avoid changing something that works. I've also read that
the newest version of Inkscape (higher than 0.92) might have complications
when it comes to some extensions. I didn't pursure that avenue either.
--
Sent from: http://forum.openscad.org/
linear_extrude( 3.6)
projection(cut = true)
translate ([0,0,70]) // 70 or what ever you need
surface(file = "ukmap.png", center = true, invert = true);
--
Sent from: http://forum.openscad.org/