Hi,
I talked today with the OpenSCAD devs on their irc and you were right.
There is a way of using their code to make benefits to both BRL-CAD and
OpenSCAD orgs.
Kintel advised me to aim towards creating a common parser for both openscad
and brl-cad and relicense that as LGPL or BSD/MIT. He said we could either
refactor existing openscad code into a clean component, or rewrite the
parser and retrofit it into openscad. The former is a bit messy but safer -
the latter would be preferable but is likely a fair bit of work. What is
your advice regarding this matter?
I understood a bit more about their internal structure (their compile table
<https://github.com/openscad/openscad/blob/master/doc/OpenSCAD-compile.pdf>
was very useful too) and there are 2 types of OpenSCAD files: *.scad-
"normal" ones, providing the full list of features and *.csg , which are a
subset that only contain a smaller set of features and those are basically
a tree describing the model using a defined set of operators. So, if for
the .scad file ,the converting flow would be .scad -> (parse) -> AST ->
(evaluate) -> Node Tree , for the .csg file that would turn into .csg ->
(parse) -> Node Tree, leaving out the evaluating part. He said that, if I
go for the .csg -> .g first, a good way to start would be this
<https://github.com/FreeCAD/FreeCAD_sf_master/tree/master/src/Mod/OpenSCAD>.
What is your opinion?
They have also told me about FreeCAD and their python parser. I believe I
could utilize that python code to quickly establish a .csg to .g converter
(that might be good for prototyping, testing etc.). The only problem will
be using it in brl-cad's binary, since brl-cad uses C/C++. A C++ component
could be build later, separately, but will take longer time. Do you think I
should start working on it ?
A beneficial aspect for both orgs would be to also make (if time allows) a
.g -> .scad converter. Kindel suggested that if we successfully develop a
.scad -> .g one, to reverse the algorithm wouldn't be so hard. I believe
this would (very probably) overcome the GSoC timeline but I'm willing to
work until October 1st (when school starts) if needed in order to complete
both converters. Do you think its a good idea or its too much to ask?
Regards,
Andrei
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel