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