Difference between revisions of "User:Cprecup/GSoC2012 progress"
(update: 30/05/2012: chose Adaptagrams; MVC pattern) |
(01/06/2012 recompile Adaptagrams' example + gain tree traversal information) |
||
Line 1: | Line 1: | ||
=Coding period= | =Coding period= | ||
===''Week 2''=== | ===''Week 2''=== | ||
+ | ====01/06/2012==== | ||
+ | Tried to recompile an ''example.cpp'' file where the Adaptagrams' library is used outside its main folder. Previous attempt to do this was unsuccessful. | ||
+ | I Managed to compile it after all. | ||
+ | |||
+ | Looked for a location where I could implement functions that would traverse a tree and construct a DAG with Adaptagrams' library. | ||
+ | |||
+ | I'm still trying to understand how librt/db_tree.c and db_walk.c work in the background. | ||
+ | |||
====30/05/2012==== | ====30/05/2012==== | ||
Adaptagrams will be used as the library of tools. | Adaptagrams will be used as the library of tools. |
Revision as of 21:27, 1 June 2012
Coding period
Week 2
01/06/2012
Tried to recompile an example.cpp file where the Adaptagrams' library is used outside its main folder. Previous attempt to do this was unsuccessful. I Managed to compile it after all.
Looked for a location where I could implement functions that would traverse a tree and construct a DAG with Adaptagrams' library.
I'm still trying to understand how librt/db_tree.c and db_walk.c work in the background.
30/05/2012
Adaptagrams will be used as the library of tools.
I've made a plan that sketches what will happend on each side of the MVC pattern for this project.
The process behind the, let's call it for now, 'igl' (Interactive Graph Layout) command that lauches the GUI is the following:
- access the geometry's hierarchy by using the 'tree' command with an additional option 'g' that returns the corresponding DAG.
- traverse this graph and construct it with the help of Adaptagram's library libavoid. Libavoid provides polyline connector routing in order to avoid obstacle objects. The result is passed on to the Tcl/Tk implementation where it will be outputted (View).
- on user action (for example: 'move' or 'delete' command is called), announce the Controller, apply modifications onto the graph by using libavoid.
Remark: other uses of Adaptagram's libraries should/may be added.
28/05/2012
Used Adaptagrams' static libraries as external ones by creating a source code file that calls methods from these libraries.
Week 1
27/05/2012
Studied Adaptagrams' documentation. Listed strong and weak points of both graph libraries, GOBLIN and Adaptagrams.
26/05/2012
Compiled Adaptagrams; studied and ran examples provided for libcola and libavoid.
25/05/2012
- Worked on compiling GOBLIN. However, I get a lot of errors. You can find them here. I am assuming it's because of the c++ standard and their latest update which was made in 2010. Submitted a bug on their sourceforge bug tracker and am waiting for a reply.
- Meanwhile, I'm having a look at the Adaptagrams' source code.
24/05/2012
Made comparisons between Adaptagrams and GOBLIN.
22/05/2012
Discussed with one of the mentors how to approach the implementation behind the command that would launch the GUI.
Talked about the possible locations where command-line functionality can be developed.
As a first step, looked for proper already existent functions in BRL-CAD that would allow me to ge the directed acyclic graph structure of a tree.
21/05/2012
Read about Adaptagrams library.
Community bonding period
General progress
19/05/2012
Studied some aspects of the GOBLIN graph library.
17/05/2012
Commit access was gained. My first commit was for the src/libbu/test_booleanize.c file; it included style and formatting corrections.
16/05/2012
Patch for the file src/libbu/booleanize.c was accepted and applied in the revision r50566.
15/05/2012
I have modified my first patch, the one meant to create a test_booleanize.c with unit tests for the file src/libbu/booleanize.c. At the same time, I found a small bug in the booleanize.c code. The patch can be found here.
14/05/2012
I have created an alternative patch for the one that is meant to separate out LIBNMG from LIBRT. This one 'moves' the files from the src/primitives/nmg location to src/libnmg without being needed an extra help from someone with commit access.
Here is a link to a temporary location for the patch since it exceeds the size limit provided by Sourceforge.
12/05/2012
I have finished a patch meant to separate out LIBNMG from LIBRT. You can find the patch here. Build system modifications have been made in the following files:
- src/librt/CMakeLists.txt
- src/librt/Makefile.am
and the following 2 files have been correspondingly added for libnmg:
- src/libnmg/CMakeLists.txt
- src/librt/Makefile.am
One thing needs to be made by a person with commit access: move the src/librt/primitives/nmg source code into src/libnmg and apply the provided patch.
Reminder: there's also this patch that I've made and needs to be reviewed. It contains unit tests for the src/libbu/booleanize.c file and it fixes a small bug that wouldn't have passed one of the tests.
10/05/2012
I've studied the src/mged, src/librt and src/conv folders, looking for methods that can be used to access the elements of a CSG tree.
Methods that got my attention:
- in the src/librt/db_tree.c file:
int db_tree_list(struct bu_vls *vls, const union tree *tp)
which fills a bu_vls with a representation of a given tree appropriate for processing by Tcl scripts. Could be useful in constructing the interactive graph.
union tree *db_tree_parse(struct bu_vls *vls, const char *str, struct resource *resp)
which takes a TCL-style string description of a binary tree, as produced * by db_tree_list(), and reconstruct the in-memory form of that tree. Could be useful after the structure of the graph is modified and the CSG needs to be updated.
2. Get commit access
08/05/2012
Worked on the patch for the NMG migration task (create a separate library LIBNMG outside LIBRT). This time, because BRL-CAD previously built without errors, things go smoother.
1. Compile & install BRL-CAD
28/04/2012
After discussing my problem with one of the mentors and finding the cause for these errors, BRL-CAD completely built.
27/04/2012
I created my first patch for BRL-CAD by using the virtual machine disk image so now I want to compile and install BRL-CAD from source (from a svn checkout).
I've followed the instructions with respect to the dependencies (the ones from here http://brlcad.org/wiki/Compiling and from the doc/README.Linux). I've used the command
cmake -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_BUNDLED_LIBS=Bundled .
but after using
make
, I kept getting these errors http://pastebin.mozilla.org/1602696.
Afterwards, I decided to try the command
cmake -DCMAKE_BUILD_TYPE=Debug .
but then I encountered another error while running it: http://pastebin.mozilla.org/1602697. I managed to solve the problem by installing itk3 and itk3-dev. However, while running the make command I bumped into the previously mentioned make errors and this one: http://pastebin.mozilla.org/1602700. The first ones refer to fontconfig symbols.