Question regarding exporting to .PNG

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

Question regarding exporting to .PNG

jessaskey
Hello... Im attempting to export to .png via the command line (using .com under Windows)... An example command line I use is... C:\Program Files\OpenSCAD\openscad.com -o C:\folder\038.png C:\folder\038.scad This succeeds and produces a valid .png file, however the render is incomplete and only has some of my objects. It also happens very quickly in comparison to exporting to an .STL which makes me think that OSCAD is just using something cached perhaps? I tried adding an extra parameter '--render' to 'force' a render... C:\Program Files\OpenSCAD\openscad.com -o C:\folder\038.png --render C:\folder\038.scad but that is not even valid according to the output. What am I doing wrong here? thank you! Jess

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
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

MichaelAtOz
Administrator
Do the --render before the -o.
That could be a bug...




-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

tp3
On 19.12.2017 01:44, MichaelAtOz wrote:
> Do the --render before the -o.
> That could be a bug...
>
That or it might be only available in the snapshot versions.

ciao,
  Torsten.


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

Re: Question regarding exporting to .PNG

MichaelAtOz
Administrator
I just ran it with 2015.03-02.



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

tp3
On Linux it does not make any difference where the --render is located.

Example SCAD:

  color("red") cube(10);

openscad -o test.png test.scad

  => red cube

openscad --render -o test.png test.scad

  => yellow cube

openscad -o test.png --render test.scad

  => yellow cube

openscad -o test.png test.scad --render

  => yellow cube

So maybe that's a problem with the OPENSCAD.COM wrapper?

What happens when using OPENSCAD.EXE?

ciao,
  Torsten.


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

Re: Question regarding exporting to .PNG

MichaelAtOz
Administrator
tp3 wrote
> What happens when using OPENSCAD.EXE?

Same.
In my case I use a square() - so preview is a yelow cube, render is a
cyan/red bordered square.

-o ... --render ...  produces the help info
--render -o ... ...  produces rendered square





-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

Michael Marx
Nabble has been dropping CRLF every so often (or it could be my email reader...), that looked
confusing.
That was:

> -o ... --render ...  produces the help info
> --render -o ... ...  produces rendered square


> -----Original Message-----
> From: Discuss [mailto:[hidden email]] On Behalf Of MichaelAtOz
> Sent: Tue, 19 Dec 2017 12:25
> To: [hidden email]
> Subject: Re: [OpenSCAD] Question regarding exporting to .PNG
>
> tp3 wrote
> > What happens when using OPENSCAD.EXE?
>
> Same.
> In my case I use a square() - so preview is a yelow cube, render is a
> cyan/red bordered square.
>
>
>
>
>
>
> -----
> Admin - PM me if you need anything, or if I've done something stupid...
>
> Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent
> possible under law, I have waived all copyright and related or neighbouring rights to this work.
> Obviously inclusion of works of previous authors is not included in the above.
>
> The TPP is no simple "trade agreement."   Fight it! http://www.ourfairdeal.org/   time is running
> out!
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


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

Re: Question regarding exporting to .PNG

jessaskey
In reply to this post by tp3
Okay, I tried it 4 ways... both EXE and COM and then with --render before and after the -o switch and parameter... looks like --render has to be first!!!!!! No difference between .com and .exe. 1. "C:\Program Files\OpenSCAD\openscad.exe" -o C:\folder\038.png --render C:\folder\038.scad RESULT: Outputs usage - invalid? 2. "C:\Program Files\OpenSCAD\openscad.com" -o C:\folder\038.png --render C:\folder\038.scad RESULT: Outputs usage - invalid? 3. "C:\Program Files\OpenSCAD\openscad.exe" --render -o C:\folder\038.png C:\folder\038.scad RESULT: This Works!!!! 4. "C:\Program Files\OpenSCAD\openscad.com" --render -o C:\folder\038.png C:\folder\038.scad RESULT: This Works!!! Not sure about my post formatting.... Im trying 'as HTML' this time... fingers crossed!! Im using Chrome.

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
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

jessaskey
The HTML checkbox didn't seem to help... sorry about that.

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
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

Michael Marx
In reply to this post by Michael Marx

Aaargh

 

cmd options> -o ... --render ... 

produces the help info

 

 

cmd options> --render -o ... ... 

produces rendered square

 

 

Like so:

 

"C:\Program Files\OpenSCAD\openscad.exe" -o 2d_exe.png 2d.scad

Compiling design (CSG Products normalization)...

Normalized CSG tree has 1 elements

(yellow = preview)

 

"C:\Program Files\OpenSCAD\openscad.exe" -o 2d_exe.png --render 2d.scad

 

Usage: C:\Program Files\OpenSCAD\openscad.exe [ -o output_file [ -d deps_file ] ]\

                                              [ -m make_command ] [ -D var=val [..] ] \

                                              [ --help ] print this help message and exit \

                                              [ --version ] [ --info ] \

                                              [ --camera=translatex,y,z,rotx,y,z,dist | \

                                                --camera=eyex,y,z,centerx,y,z ] \

                                              [ --autocenter ] \

                                              [ --viewall ] \

                                              [ --imgsize=width,height ] [ --projection=(o)rtho|(p)ersp] \

                                              [ --render | --preview[=throwntogether] ] \

                                              [ --colorscheme=[Cornfield|Sunset|Metallic|Starnight|BeforeDawn|Nature|DeepOcean] ] \

                                              [ --csglimit=num ]\

                                              filename

(help)

 

 

"C:\Program Files\OpenSCAD\openscad.exe" --render -o 2d_exe.png 2d.scad

(cyan/red 2d)

 

 

 

> -----Original Message-----

> From: Discuss [mailto:[hidden email]] On Behalf Of Michael Marx

> Sent: Tue, 19 Dec 2017 12:29

> To: 'OpenSCAD general discussion'

> Subject: Re: [OpenSCAD] Question regarding exporting to .PNG

>

> Nabble has been dropping CRLF every so often (or it could be my email reader...), that looked

> confusing.

> That was:

>

> > -o ... --render ...  produces the help info

> > --render -o ... ...  produces rendered square

>

>

> > -----Original Message-----

> > From: Discuss [mailto:[hidden email]] On Behalf Of MichaelAtOz

> > Sent: Tue, 19 Dec 2017 12:25

> > To: [hidden email]

> > Subject: Re: [OpenSCAD] Question regarding exporting to .PNG

> >

> > tp3 wrote

> > > What happens when using OPENSCAD.EXE?

> >

> > Same.

> > In my case I use a square() - so preview is a yelow cube, render is a

> > cyan/red bordered square.

> >

> >

> >

> >

> >

> >

> > -----

> > Admin - PM me if you need anything, or if I've done something stupid...

> >

> > Unless specifically shown otherwise above, my contribution is in the Public Domain; to the

> extent

> > possible under law, I have waived all copyright and related or neighbouring rights to this

> work.

> > Obviously inclusion of works of previous authors is not included in the above.

> >

> > The TPP is no simple "trade agreement."   Fight it! http://www.ourfairdeal.org/   time is

> running

> > out!

> > --

> > Sent from: http://forum.openscad.org/

> >

> > _______________________________________________

> > OpenSCAD mailing list

> > [hidden email]

> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

>

>

> _______________________________________________

> OpenSCAD mailing list

> [hidden email]

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


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

Re: Question regarding exporting to .PNG

MichaelAtOz
Administrator
In reply to this post by jessaskey
I've never used HTML.

jessaskey - I haven't seen such formatting problems before, are you posting
that on the forum, or sending using the mailing-list?





-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding exporting to .PNG

jessaskey
So, those original posts are via the Web Interface on the forum.... this one is from email..

1. Line 1
2. Line 2
3. Line 3

I will stick to email in the future, probably easier anyway. 😊

-----Original Message-----
From: Discuss [mailto:[hidden email]] On Behalf Of MichaelAtOz
Sent: Monday, December 18, 2017 6:41 PM
To: [hidden email]
Subject: Re: [OpenSCAD] Question regarding exporting to .PNG

I've never used HTML.

jessaskey - I haven't seen such formatting problems before, are you posting that on the forum, or sending using the mailing-list?





-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

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

Re: Question regarding exporting to .PNG

tp3
In reply to this post by Michael Marx
On 19.12.2017 02:28, Michael Marx wrote:
> Nabble has been dropping CRLF every so often (or it could be my email reader...), that looked
> confusing.
> That was:
>
>> -o ... --render ...  produces the help info
>> --render -o ... ...  produces rendered square
>
Strange, that should be the same code on Linux and Windows (using
Boost Program Options). Not sure why that behaves differently.

(Or maybe I'm just overlooking some Windows trick...)

ciao,
  Torsten.

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