null output operator

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

null output operator

chrysn
hi,

for a current project (designing a LARP dungeon from limited resources),
i am using the echo output in combination with command line compilation
to validate piece and other resource usage by parsing echo output in a
python script.

now the problem is that all the export functions trigger the time
intensive cgal calculations, which are not needed here at all. i
therefore propose the inclusion of a null output command line operation.
such an operation would parse the file, run it, and echo all echos to
/dev/stdout, but invoke neither the cgal nor the opencsg backend (it
might build that opencsg tree thingy if that helps finding errors). this
would also allow for fast validity checks, as it find both syntax and
run time errors (but not cgal errors).

i'd suggest the command line argument -c (short for --check), so the
usage would change to

Usage: openscad [ { -s stl_file | -o off_file | -x dxf_file | -c } ...
                                                            ^^^^

regards
chrysn

--
Diskordier schwimmen nicht gegen den Strom, sie klettern aus dem Fluss.

signature.asc (198 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: null output operator

Giles Bathgate
On 13/07/2010 12:37, chrysn wrote:
hi,

for a current project (designing a LARP dungeon from limited resources),
i am using the echo output in combination with command line compilation
to validate piece and other resource usage by parsing echo output in a
python script.

now the problem is that all the export functions trigger the time
intensive cgal calculations, which are not needed here at all. i
therefore propose the inclusion of a null output command line operation.
such an operation would parse the file, run it, and echo all echos to
/dev/stdout, but invoke neither the cgal nor the opencsg backend (it
might build that opencsg tree thingy if that helps finding errors). this
would also allow for fast validity checks, as it find both syntax and
run time errors (but not cgal errors).

i'd suggest the command line argument -c (short for --check), so the
usage would change to

Usage: openscad [ { -s stl_file | -o off_file | -x dxf_file | -c } ...
                                                            ^^^^

regards
chrysn

_______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad
Rather than null output, prehaps this could be done as part of Marius "visitor" pattern work. He could create a text based backend that could be plugged-in in place of OpenCSG or CGAL, and then prettyprint the CSG tree to a file, and the echo output to stdout. I was just thinking that it might be desirable feature to have for OpenSCAD testing frameworks, whereas the feature you suggested seems to have a very niche use case.

Regards

Giles.
Reply | Threaded
Open this post in threaded view
|

Re: null output operator

R. Mark Adams, PhD
Wow!  Interesting project- can you share some more details on what you
are building the LARP dungeon out of? Life size, I assume?  :-)  How
are you using OpenSCAD to help you do it?  Too cool.

Thanks!
-Mark

On Tue, Jul 13, 2010 at 7:57 AM, Giles Bathgate <[hidden email]> wrote:

> On 13/07/2010 12:37, chrysn wrote:
>
> hi,
>
> for a current project (designing a LARP dungeon from limited resources),
> i am using the echo output in combination with command line compilation
> to validate piece and other resource usage by parsing echo output in a
> python script.
>
> now the problem is that all the export functions trigger the time
> intensive cgal calculations, which are not needed here at all. i
> therefore propose the inclusion of a null output command line operation.
> such an operation would parse the file, run it, and echo all echos to
> /dev/stdout, but invoke neither the cgal nor the opencsg backend (it
> might build that opencsg tree thingy if that helps finding errors). this
> would also allow for fast validity checks, as it find both syntax and
> run time errors (but not cgal errors).
>
> i'd suggest the command line argument -c (short for --check), so the
> usage would change to
>
> Usage: openscad [ { -s stl_file | -o off_file | -x dxf_file | -c } ...
>                                                             ^^^^
>
> regards
> chrysn
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>
> Rather than null output, prehaps this could be done as part of Marius
> "visitor" pattern work. He could create a text based backend that could be
> plugged-in in place of OpenCSG or CGAL, and then prettyprint the CSG tree to
> a file, and the echo output to stdout. I was just thinking that it might be
> desirable feature to have for OpenSCAD testing frameworks, whereas the
> feature you suggested seems to have a very niche use case.
>
> Regards
>
> Giles.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>
>



--
| R. Mark Adams, Ph.D.       |   "Information is light.      |
| Computational Biologist    |    Information in itself,     |
| http://www.epotential.com  |    about anything, is light." |
| [hidden email]     |       - Tom Stoppard          |