Odd problem with exported CSG

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

Odd problem with exported CSG

David Goodenough
I am not sure if this is a problem with openscad or with the RepRap host
code, but I exported a CSG version of my model and got the following:-

group() {
        group() {
                group();
                group();
                group();
                group();
                group();
                difference() {
                        union() {
                                difference() {
.....

at the start of the file.  RepRap host barfed on this complaining
that it expected group() {} not group();  If nothing else the null
groups do seem rather redundant.

David

Reply | Threaded
Open this post in threaded view
|

Re: Odd problem with exported CSG

kintel
Administrator
On Dec 28, 2011, at 13:44 PM, David Goodenough wrote:

> at the start of the file.  RepRap host barfed on this complaining
> that it expected group() {} not group();  If nothing else the null
> groups do seem rather redundant.
>
It's due to the fact that every node has to evaluate to something. echo() nodes evaluate to empty groups().

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: Odd problem with exported CSG

David Goodenough
On Wednesday 28 Dec 2011, Marius Kintel wrote:

> On Dec 28, 2011, at 13:44 PM, David Goodenough wrote:
> > at the start of the file.  RepRap host barfed on this complaining
> > that it expected group() {} not group();  If nothing else the null
> > groups do seem rather redundant.
>
> It's due to the fact that every node has to evaluate to something. echo()
> nodes evaluate to empty groups().
>
>  -Marius
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
So the RepRap host code is in error in rejecting it?  If so I will
adjust that code to cope.

BTW, is there a document that describes all the things that can appear
in a CSG file?  I looked on the opencsg site and could not spot one, but
I may have looked in the wrong place.

David

Reply | Threaded
Open this post in threaded view
|

Re: Odd problem with exported CSG

kintel
Administrator
On Dec 28, 2011, at 14:32 PM, David Goodenough wrote:
> So the RepRap host code is in error in rejecting it?  If so I will
> adjust that code to cope.
>
That would probably be the best. This might change in the future, but it doesn't hurt accepting what is output today.

> BTW, is there a document that describes all the things that can appear
> in a CSG file?  I looked on the opencsg site and could not spot one, but
> I may have looked in the wrong place.
>
It's not documented, but the regression tests should cover all possibilities:
https://github.com/openscad/openscad/tree/master/tests/regression/dumptest

 -Marius