Re: [brlcad-devel] Interest in contributing to brlcad
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Christopher S. M. <br...@ma...> - 2014-08-05 15:10:14
|
On Aug 5, 2014, at 6:56 AM, Djimeli Konrad wrote: > Hello > > My name is Djimeli Konrad and i am interested in contributing to the open source through brlcad. I am primarily a c/c++ programmer from Africa and would like to work on any of the brlcad geometry converters. Presently i am doing some research on how import and export work but i can not really decide on weather to improve any of the existing converter or create a new one among those on the ideas page, since i do not fully understand the concept and also my limitation. I would be glad to get any pointer that would help facilitate my understanding of this aspect and i am willing to dedicate the rest of my summer holiday to learn more about brlcad and especially file import and export as it seem to be something very interesting to work on. Hi Konrad and welcome! Glad to hear about your interests. Working on converters is actually a high priority for us right now because we're creating a new geometry conversion library that can be embedded into applications external to BRL-CAD. This requires improving our existing converters and implementing new ones. To get started, I would recommend first extending / improving one of our existing converters. It's harder to read code than to write code, but that will give a much better understanding of how our converters work. It will also better prepare you for writing a new converter, should you attempt that as well. A simple task to begin with would be to make any existing converter convert all top-level objects by default. Currently, you specify which file (e.g., myfile.g) and which object(s) to convert (e.g., object1 and object2), so when you run something like g-stl, the usage looks like this: Usage: g-stl [-bvi8] [-xX lvl] [-P num_cpus] [-a abs_tess_tol] [-r rel_tess_tol] [-n norm_tess_tol] [-D dist_calc_tol] [-o output_file_name.stl | -m directory_name] brlcad_db.g object(s) And a typical use would be: g-stl -o myfile.stl myfile.g object1 object2 You could make it work so that you don't have to specify any objects: g-stl -o myfile.stl myfile.g This would convert all top-level object(s). To make that work, you'll probably want to use the db_ls() function (e.g., something like db_ls(dbip, DB_LS_TOPS, &paths); will get a list of objects). The converters are in the src/conv directory. You can see db_ls in use in the src/libged directory. Cheers! Sean |