User:NyahCh3ck20/GSoc2013/Coding Report

Revision as of 12:37, 26 June 2013 by NyahCh3ck20 (talk | contribs) (24 June - 30 June)

Coding Log Report for GSoc 2013

Daily log:

17 June - 23 June

Coding Begins for GsoC working on codepatch to be uploaded to brlcad uploaded the sourcefile for new push routine which supports the -x option for xpush but still needs further testing and modifications.

18 june 2013 Added a new functionality to new push routine where the push would recognise the the xpush case even in a case where the -x option is ommitted or ignored.

Tested the new routine and extracted patch to be uploaded to sourceforge replacing the previous push file I uploaded.

To discuss with mentors whether there is an implementation of the Inverse of a 4x4 matrix in the brlcad source code.

Looking at the implementations of the Inverse of the matrix in BRL-CAD

24 June - 30 June

  • Monday June 24

Looked at the definitions for the inverse of a 4x4 matrix as defined in /src/libbn/mat.c. However, i realised orthogonal matrices were not taken into consideration. So added functionality to determine inverse faster for othogonal matrices and to upload patch to sourceforge shortly.

Started creating structures for the pull routine that is ( pull_obj and p_solid) structures to hold objects to be pushed and solids currently being pushed on a CSG tree. Code to be added to sourceforge Shortly.

re-read the HACKING file to make sure i conformed with the coding standards for BRL-CAD.

  • Tuesday June 25

Further tested the bn_mat_inverse routine(src/libbn/mat.c) and modified patch that was to be uploaded yesterday but failed due to poor network connection.

Looked at the libbn library especially mat.c which would be useful for implementing the pull.

Studied the vmath.h header and discovered the transform.c file which could be applied in creating the pull routine.

Uploaded the pull.c first patch and bn_mat_inverse patches due to failure in network for them to be uploaded yesterday. Inverse Matrix support for orthogonal matrices

Will need some clarification from mentors concerning my design strategy for the pull routine.( The necessary functions i would need to create or call from the source) in order to implement a complete pull routine.(Asked on mailing list.) still to continue work on push and xpush merger.

Saw the importance of magic numbers in taking note of visited nodes along the CSG tree. Also, thought of checking the matrix transformations for each node to determine if node has been visited but since magic IDs were used in the push then i could use both in pull when performing the inorder walk from the leaf(solid) nodes.

Moreover, for objects in database, dp->d_uses was used but not safe as defined push.

  • Wednesday July 26

Earlier part of the day used for preparation for and wrote an Information System test before working.

Added the new pull routine to the setup.c(/src/mged/setup.c) interface and included the new command into the CMakeLists.txt file(/src/libged/CMakeLists.txt) in the brlcad source

These patches also included the removal of the xpush command to support the new push and xpush. Patches to be uploaded to sf.

Added new pull routine declaration(ged_pull(struct ged *,int, char *[])) to the ged.h header so it can be accessed by other files. patches to be uploaded to sf.

Added new pull to tclcad_obj.c file(/src/libtclcad/) although with support of more than one arguments i'll first of all try to test with only one argument then see how far it goes;this is so that it's available in the internal database interface.

Added tentative ged_pull() function definition to the pull.c file to enable it to be accessed by files calling function.

However since ged_pull() routine does not compile code can't compile due to unused variables so will create some dummy operations just to see how blank routine works and get it started.

Well just realised that the orthogonal matrix consideration in the bn_mat_inverse routine in mat.c is causing the benchmark tests to fail. Gotta sit on it and fix the bug. Links to Patches () ()

1 July - 7 July

8 July - 14 July

15 July - 21 July

22 July - 28 July

Original Timeline

Since i'll have to attend the Google Student Ambassador's summit in the first days of July and exams begin on the early part of July i'll move some of the work overhead to june when coding begins.

Community Bonding Period

    May 30

June 13 TODO: combination of push and xpush routine.

     changed xpush to push -x 

June 14:

    Integration into MGED and tests of new command.