On Sun, Apr 20, 2014 at 4:13 PM, Richard Gillham Darnley <rgdarn...@gmail.com> wrote: > Hi, > > I would like to introduce myself. I am a 'mature' newbie programmer who > would like to produce a conversion routine between BRL-CAD's native file > format to what is called Geometry Description Markup Language (GDML).
Welcome! This is actually the first I've heard about GDML - this is the CERN file format? > As I am still learning to program in C I see this project taking me some > time, but any advice from the other developers would be much appreciated as > to the steps to take or other smaller goals to achieve first. I can't get their web page to come up at the moment, so without knowing what they offer in the way of useful code all I can suggest are general steps (after first downloading and compiling BRL-CAD - our website describes that process in detail - http://brlcad.org/wiki/Compiling): 1) Check if the schema (defining the file format) has any restrictions that would make using the format problematic. Hopefully at least the format definition will be relatively unencumbered. 2) Check what license they are applying to their C/C++ code and see if it is compatible (Sean is probably your best resource for something like that) - if we can use their reader/writer code for the format, it saves having to write our own parser. If not, and we got past step 1, then it's parser/lexer time. 3) Once we know what the situation is with digesting the format's syntax, then comes the conceptual mapping - how do we express GDML geometry in BRL-CAD, and vice versa? Would supporting GDML require new primitives? Are some of BRL-CAD's primitives and structures not expressible in GDML? Etc. 4) Once we know what the mapping is, the first thing to do is implement a basic gdml-g importer that handles one or two simple types of geometry. Verify that you can bring those in successfully, then gradually expand the complexity. If we have the LIBGCV library API defined before you reach this stage, then the work would be done there instead of in a gdml-g tool. That's a very rough/general overview. Step 3 is very likely the hardest, as it will require intimate knowledge of the two formats and their respective descriptive power. However, there are lots of existing converters that can help serve as how-to examples for the various bits. Cheers, CY ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel