[OpenSCAD] Specification of CSG file format?

Torsten Paul Torsten.Paul at gmx.de
Sun May 17 18:28:51 EDT 2015


On 05/18/2015 12:11 AM, Carsten Arnholm wrote:
> My first question is whether *.csg files are specific to OpenSCAD
 >
Yes, they are OpenSCAD specific. I don't think there's a clear
documentation for the file content.

> Second, is it correct to say that the contents of a *.csg file
 > generated or read by OpenSCAD is a subset of the *.scad language
 >
Yes, actually the test framework now validates that. There are
some corner cases that do not work though (mainly inf/nan
values).
I think it would make the format even more useful to define
some additional 2D modules so things like text() and the
upcoming trace() could be resolved. Right now the program
reading *.csg would need to render text or trace bitmaps
itself.

> Third, there also seems to be an extension "group()" to the
 > *.scad language. Is it correct to say that "group()" in *.csg
 > is a direct 1:1 unnamed equivalent to a "module" in *.scad?
 > And, is there any difference at all between "group()" and
 > "union()" in *.csg files? It seems to me the answer is no,
 > apart from "group()" indicating what used to be a module?
>
I'm not sure about that one, I think currently group() does
behave like union() due to the implicit union happening
automatically. That might change with the removal of implicit
unions (https://github.com/openscad/openscad/issues/350).

ciao,
   Torsten.






More information about the Discuss mailing list