Nabble removed Mailing-list integration from the Forum.
This killed the Forum. This is now an ARCHIVE.
It is likely Nabble will shutdown in the future.

So basically the Forum is now out of date, we are looking into migrating the history.

OpenSCAD support is now provided by the Mailing List.
See the first pinned post here for instructions on subscribing to the mailing list.

STL, scad files to pngs

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

STL, scad files to pngs

Amachete
Hello

I would like to create a set of pngs files from STLs in unattended way, from command line for example.

I read that Openscad has the option -o Output.png.

If I create a file:

cube.scad  which contains:
      import("cube.stl")

in the command line (cmd):
    openscad.exe cube.scad -o cube.png --imgsize=600,600

I got a png file, with and empty canvas......


What am I doing wrong?  I just want an easy way to make preview of my STL files,
Is it posible?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

kintel
Administrator
Missing semicolon?
      import("cube.stl");

What is the error message?

Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

Amachete
Yes you are right , in my SCAD file there was the semicolon.

I do not get any error message, the problem is what I get is not right, I only get a png file empty or looks like empty.

My command in cmd is:

Openscad.exe --render -o cube.png cube.scad

and I get nothing usable as image....

Thank you for answering so quick!!
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

kintel
Administrator
Try the following:

1) Use openscad.com instead of openscad.exe
2) Don't use the --render option - that's used for rendering to STL. If you don't want an STL file, omitting this option is quicker and more robust.

..and make sure to use OpenSCAD-2015.03, not an old version.

 -Marius
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

Peter Falke
There is a web site at http://openscad.com/ , but it is japanese.  .)

2015-03-27 14:39 GMT+01:00 kintel <[hidden email]>:
Try the following:

1) Use openscad.com instead of openscad.exe
2) Don't use the --render option - that's used for rendering to STL. If you
don't want an STL file, omitting this option is quicker and more robust.

..and make sure to use OpenSCAD-2015.03, not an old version.

 -Marius




--
View this message in context: http://forum.openscad.org/STL-scad-files-to-pngs-tp12240p12245.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



--
[hidden email]

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!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

Amachete
Hello

I think you did not get what I want to do...

I want an image, screenshot, preview, thumbnail  of my stl files, as you know these kind of files, do not have an image embebed as other kind of file have.

So I thought of taking a preview of these files. I read that openscad command has an option of make a PNGs....I do not know how to make this comand works right.

that´s why I made that scad with import and the command line....

The question how can i make a picture of an scad file..?


Maybe openscad is not the right tool for I want to.....so I will keep working on searching....

Thank you all
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

kintel
Administrator
What you want should work on the cmd-line:
$ openscad myfile.scad -o myfile.png

myfile.scad:
import("myfile.stl");

Both myfile.scad and myfile.stl must be in the same folder.
If that doesn't work, please post the STL somewhere.

 -Marius
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

Amachete
Hello

Sorry for the delay replying you...

I ´ve got nothing yet!!

These are the files you requested for
cubo.scad
cubo.stl

OpenSCAD.JPG

It does not work....I hope you can help me out with this issue..

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

kintel
Administrator
You probably don't have write access to 'Program Files'. Try using an absolute path, running as administrator, changing access permissions or running in a different folder.

 -Marius
Reply | Threaded
Open this post in threaded view
|

Re: STL, scad files to pngs

Amachete
Yes.It worked!!!

Thank you very much, i did not realize of that mistake....

Now I have to create an small script in order to make all the screenshoots for every stl file in my folders, easily!!