[OpenSCAD] Surface() from PNG and difference()

Torsten Paul Torsten.Paul at gmx.de
Wed Apr 29 14:04:36 EDT 2015

On 04/29/2015 07:01 PM, MLewis wrote:
> I've got a PNG that I want to "stamp" into the side of an object. To test
> this, I created the following code:
Try scaling down the image a bit. The way surface() creates the object is
not ideal for this type of usage as it creates a huge number of vertices
making the difference very slow.
The option to import images as 2D shape will hopefully come soon, that
would probably make things quite a bit faster, e.g.
(https://github.com/openscad/openscad/pull/1110). To get a similar result
it would be possible to convert the image to DXF using inkscape.

With size 200x212 the model renders in 48 seconds on my notebook.


More information about the Discuss mailing list