Hello!
As we discussed, I have submitted a patch
<https://sourceforge.net/p/brlcad/patches/329/> adding a very simple
OpenSCAD importer, any feedback is appreciated!
After looking at the
https://github.com/TomHodson/Raspberry-Pi-OpenSCAD-Model I believe a
confusion I had cleared. I initially believed OpenSCAD would have a binary
format(similar to .g) and I couldn't figure what would I need a parser for?
At this moment, my understanding is that OpenSCAD uses text format, which I
have to parse, build logic from, then save the logic in a .g geometry
database. My priority is to fix any issues at that initial, very simple
patch, so if you have any suggestions, please let me know.
After that, I will start working on my proposal the same time as I further
extend the OpenSCAD logic/parser. I was thinking that the next step would
be to correctly identify the modules in OpenSCAD structure and store them
in a data structure(possibly a vector, initially?).
How does that sound?
Thank you! Your support/replies helped me get a much clearer scope and
understanding of this project than I initially had!
Andrei Ilinca
On Mon, Mar 16, 2015 at 12:24 AM, Clifford Yapp <cliffy...@gmail.com> wrote:
> On Sun, Mar 15, 2015 at 5:59 PM, Ilinca Andrei
> <andrei.ilinc...@gmail.com> wrote:
> > Hi,
> >
> > Based on your reply, I decided to focus on the OpenSCAD Importer
> project. I
> > have been looking over the 3dm-g and g-3dm files and my understanding is
> > that they convert the geometry from 3dm model ( Rhino Modeling ) to
> BRL-CAD
> > .g format, namely BRL-CAD database.
>
> Yes.
>
> > I have also found the BRL-CAD Database Format but I didn't quite find
> > something similar regarding the OpenSCAD , except for this file . I'm
> not
> > sure if it's the right format documentation. Could you please point me
> into
> > the right direction to where a OpenSCAD format description exists or
> > confirm?
>
> I would suggest starting here:
> http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General
> http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language
>
> You'll need to first create a lexer/parser for the high level OpenSCAD
> language (first link). Once you've got that, you will move on to the
> more specific geometric concepts. Remember OpenSCAD is GPL and
> BRL-CAD is LGPL, so we can't just grab OpenSCAD's own implementation
> of the language from their code.
>
> > Please correct me if I'm wrong, to sum up, my understanding is that I
> have
> > to implement a file similar to 3dm-g, but for the OpenSCAD format. Once I
> > figure out what format OpenSCAD uses, the first step I would take is to
> > implement a dummy stub(a new OpenSCADformat-g.cpp and .h) that reads an
> > OpenSCAD file as-is, connected to CMAKE logic. Does this make sense? If
> not,
> > how should I proceed?
>
> That sounds like an excellent start - I'd probably call it scad-g
> based on their file extension. Indeed, an initial patch might be to
> create an scad-g file hooked in in src/conv that reads an OpenSCAD
> file and prints back its contents. (More interesting would be to
> begin to identify structure in the file, but aim for a clean patch
> that is more basic rather than something with more features that's not
> up to the HACKING file's standards.) Here's a simple example scad
> file you can test with:
>
> https://github.com/TomHodson/Raspberry-Pi-OpenSCAD-Model
>
> Cheers,
> CY
>
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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