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

Peter Falke stempeldergeschichte at googlemail.com
Wed Apr 29 14:00:04 EDT 2015


Your .png is quiet big.
A resolution of 587 * 623 is a lot.
Try to figure out how many triangles this surface would have: 731 402.
This will bring Openscad to its knees.
I havent checked the manual, but I seem to remember that there is a limit
of 100*100 for the surface command.

Hope it helps.

P.S.: the 2 screen shots dont display



2015-04-29 19:01 GMT+02:00 MLewis <revmikelewis at gmail.com>:

> Hoping someone can give me a hand here:
>
> I've got a PNG that I want to "stamp" into the side of an object. To test
> this, I created the following code:
>
> *** BEGIN CODE ***
> logo="M3logo1.png";
>
> wid=58;
> logox = 587;
> logoy = 623;
>
> difference(){
>     cube([wid,wid,2]);
>     translate([wid/4,wid/4,3])
>         scale([.5*wid/logox,.5*wid/logoy,.02])
>             surface(file=logo,invert=true);
>
> }
> *** END CODE ***
>
> As shown below, it previews (F5) correctly. However, the GUI is very
> sluggish with this render.
> When I attempt to render (F6), however, I get nothing:
>
> The original PNG:
> <http://forum.openscad.org/file/n12517/M3logo1.png>
>
> The Preview:
> <http://forum.openscad.org/file/n12517/Screen_Shot_2015-04-29_at_11.png>
>
> The Attempt to Render:
> <http://forum.openscad.org/file/n12517/Screen_Shot_2015-04-29_at_11.png>
>
> One other data point: I've increased my caches in the GUI, but when I run
> "OpenSCAD -o foo.stl LogoTest.scad" from the command line, I get "WARNING:
> GeometryEvaluator: Node didn't fit into cache" errors (three of them), the
> process runs forever (as far as I can tell) and uses 99ish% of the CPU.
>
> Any help that anyone can provide would be greatly appreciated. Thanks a
> lot!
>
>
> Mike Lewis
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/Surface-from-PNG-and-difference-tp12517.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>



-- 
stempeldergeschichte at googlemail.com <karsten at rohrbach.de>

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20150429/6f804078/attachment-0002.html>


More information about the Discuss mailing list