I've been "engraving" a logo on a surface by differencing some text that
I created using write().
The customer now supplied a logo file (attached as a PNG). I can get
the thing to appear using
scale([0.1, 0.1, 0.1])
surface(file =
"d:/jon/Logo_AnywhereTideClock_Inverted.png", center = true);
The problem is that once that is done, OpenSCAD becomes essentially
unresponsive. F5 and F6 take forever, and the visible model when using
F5 is very slow. I tried using render() but that did not help either.
I tried computing an STL separately and then using import(), but that is
equally slow (the STL is 150KB).
Any idea how to "emboss" an arbitrary PNG onto a surface without making
OpenSCAD unusable?
Jon
For this particular design, get a vector file rather than a bitmap, or remake the design using OpenSCAD primitives.
surface() is going to destroy responsiveness as it has to generate massive amounts of polygons.
-Marius
On Nov 9, 2015, at 10:49 AM, jon jon@jonbondy.com wrote:
I've been "engraving" a logo on a surface by differencing some text that I created using write().
The customer now supplied a logo file (attached as a PNG). I can get the thing to appear using
scale([0.1, 0.1, 0.1])
surface(file = "d:/jon/Logo_AnywhereTideClock_Inverted.png", center = true);
The problem is that once that is done, OpenSCAD becomes essentially unresponsive. F5 and F6 take forever, and the visible model when using F5 is very slow. I tried using render() but that did not help either.
I tried computing an STL separately and then using import(), but that is equally slow (the STL is 150KB).
Any idea how to "emboss" an arbitrary PNG onto a surface without making OpenSCAD unusable?
Jon
<Logo_AnywhereTideClock_Inverted.PNG>_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 11/09/2015 10:49 AM, jon wrote:
how to "emboss" an arbitrary PNG
Use a much smaller image with the worst resolution = fewest pixels you
can possibly stand.
A year or two ago, OpenSCAD could handle an image up to about 300x300
pixels. That may have changed one way or the other, but it'll give you
an idea of how small "fewest" must be.
Here's the checklist I used to create PNG images for cookie cutter outlines:
http://softsolder.com/2012/11/29/automated-cookie-cutters-image-preparation-checklist/
And for chocolate molds:
http://softsolder.com/2014/02/14/chocolate-mold-image-preparation-checklist/
When you need more dots, surface() is not your friend...
--
Ed
softsolder.com
Trace the bitmap to a path in Inkscape and export it the path to .dxf[0]
or even.scad[1] using an Inkscape plugin
[0] http://www.thingiverse.com/thing:14221
[1] http://www.thingiverse.com/thing:25036
On Mon, Nov 9, 2015 at 9:59 AM Ed Nisley ed.nisley@pobox.com wrote:
On 11/09/2015 10:49 AM, jon wrote:
how to "emboss" an arbitrary PNG
Use a much smaller image with the worst resolution = fewest pixels you
can possibly stand.
A year or two ago, OpenSCAD could handle an image up to about 300x300
pixels. That may have changed one way or the other, but it'll give you
an idea of how small "fewest" must be.
Here's the checklist I used to create PNG images for cookie cutter
outlines:
http://softsolder.com/2012/11/29/automated-cookie-cutters-image-preparation-checklist/
And for chocolate molds:
http://softsolder.com/2014/02/14/chocolate-mold-image-preparation-checklist/
When you need more dots, surface() is not your friend...
--
Ed
softsolder.com
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I also advise inkscape and the "Trace bitmap" command and then export using
the openscad export script.
But I made a v7 which works better if you're going to use the polygon shape
in a dedicated piece of code.
It puts the polygon into a avriable of points and paths if required.
Here:
But then you may have to use png for some reason. In which case make it as
small as possible.
--
View this message in context: http://forum.openscad.org/using-a-PNG-logo-tp14319p14325.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Btw.,
For the adventurous, there is an experimental bitmap tracer in a separate OpenSCAD branch:
https://github.com/openscad/openscad/pull/1110
https://github.com/openscad/openscad/tree/potrace
-Marius
Yeah I think the number of pixels is killing OpenSCAD due to the
unnecessarily large number of polygons. This particular design is
simple enough that it OUGHT to be generated with some vector-based
format. By .DXF as someone suggested or re-design it from OpenSCAD coding.
I've made 512x512 bitmap embossing on OpenSCAD with satisfactory result
(pre-2015-03).
On 11/9/2015 11:49 PM, jon wrote:
I've been "engraving" a logo on a surface by differencing some text
that I created using write().
The customer now supplied a logo file (attached as a PNG). I can get
the thing to appear using
scale([0.1, 0.1, 0.1])
surface(file =
"d:/jon/Logo_AnywhereTideClock_Inverted.png", center = true);
The problem is that once that is done, OpenSCAD becomes essentially
unresponsive. F5 and F6 take forever, and the visible model when
using F5 is very slow. I tried using render() but that did not help
either.
I tried computing an STL separately and then using import(), but that
is equally slow (the STL is 150KB).
Any idea how to "emboss" an arbitrary PNG onto a surface without
making OpenSCAD unusable?
Jon
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
錢建庭 教授、教研办副主任
深圳大学 生物医学工程系
CHIN, Chien Ting, Professor, Vice Chairman (Education)
Department of Biomedical Engineering
Shenzhen University
Tel: +86-755-8667-1915
Hey Marius,
Some smarts could be added to this section of surface.cc:
https://github.com/openscad/openscad/blob/master/src/surface.cc#L236-L260
...to only create two poly's (not four with vx average midpoint) in the
following three cases:
v1==v3
v2==v4
v1==v2 && v3==v4
This could reduce the mesh size significantly in monochrome and same-colour
regions, and it should also take care of many artificial "saw tooth
diagonals" around the perimeter of same-colour regions.
Thoughts?
Andrew.
--
View this message in context: http://forum.openscad.org/using-a-PNG-logo-tp14319p14342.html
Sent from the OpenSCAD mailing list archive at Nabble.com.