https://brlcad.org/w/api.php?action=feedcontributions&user=Tandoorichick&feedformat=atomBRL-CAD - User contributions [en]2024-03-28T22:43:01ZUser contributionsMediaWiki 1.32.2https://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9828User:Tandoorichick/GSoC2016/Logs2016-08-22T15:55:42Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - 25/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
27/7/16 - 11/8/16 - Had fallen ill and couldn't get to work. <br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
13/8/16, 14/8/16 - Debugging the instance of the heal command being called on a mesh on which the heal command had already been called. <br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.<br />
<br />
17/8/16 - Testing with meshes to figure out the point of breaking. Wrote blogs for weeks missed.<br />
<br />
18/8/16 - Started with taking tolerance as user input. Errors popped up. Could not identify what was causing them even after falling back to old code.<br />
<br />
19/8/16 - Build error resolved. Added feature to take in zipper tolerance as user input. Debugged with Daniel's suggestions. Error seems to be with setting the incident face reference - because of the orientation checking. With the spheres the origin was within the whole sphere, so orientation was consistent. With the torus, the origin is not inside the object, so inconsistencies with orientation don't allow some edges to get the right incident face. Hence, the next and previous references get messed up too. Yet to think of a fix.<br />
<br />
20/8/16 - Dealing with the mesh not being completely healed because some vertices don't get valid feature pairs, even while having them. Added a special case for when the hole is triangular to reduce compute time.<br />
<br />
21/8/16 - Had missed a condition in checkAndSetTwins() routine. Debugged and found it. This prevented the case where, when a mesh is healed with the heal command, and the heal command is called again on the mesh, the algorithm hung. This was because of the presence of singular vertices which was in turn because the mesh was not completely healed. This was rectified.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9827User:Tandoorichick/GSoC2016/Logs2016-08-21T23:16:36Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.<br />
<br />
17/8/16 - Testing with meshes to figure out the point of breaking. Wrote blogs for weeks missed.<br />
<br />
18/8/16 - Started with taking tolerance as user input. Errors popped up. Could not identify what was causing them even after falling back to old code.<br />
<br />
19/8/16 - Build error resolved. Added feature to take in zipper tolerance as user input. Debugged with Daniel's suggestions. Error seems to be with setting the incident face reference - because of the orientation checking. With the spheres the origin was within the whole sphere, so orientation was consistent. With the torus, the origin is not inside the object, so inconsistencies with orientation don't allow some edges to get the right incident face. Hence, the next and previous references get messed up too. Yet to think of a fix.<br />
<br />
20/8/16 - Dealing with the mesh not being completely healed because some vertices don't get valid feature pairs, even while having them. Added a special case for when the hole is triangular to reduce compute time.<br />
<br />
21/8/16 - Had missed a condition in checkAndSetTwins() routine. Debugged and found it. This prevented the case where, when a mesh is healed with the heal command, and the heal command is called again on the mesh, the algorithm hung. This was because of the presence of singular vertices which was in turn because the mesh was not completely healed. This was rectified.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9826User:Tandoorichick/GSoC2016/Logs2016-08-20T22:49:07Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.<br />
<br />
17/8/16 - Testing with meshes to figure out the point of breaking. Wrote blogs for weeks missed.<br />
<br />
18/8/16 - Started with taking tolerance as user input. Errors popped up. Could not identify what was causing them even after falling back to old code.<br />
<br />
19/8/16 - Build error resolved. Added feature to take in zipper tolerance as user input. Debugged with Daniel's suggestions. Error seems to be with setting the incident face reference - because of the orientation checking. With the spheres the origin was within the whole sphere, so orientation was consistent. With the torus, the origin is not inside the object, so inconsistencies with orientation don't allow some edges to get the right incident face. Hence, the next and previous references get messed up too. Yet to think of a fix.<br />
<br />
20/8/16 - Dealing with the mesh not being completely healed because some vertices don't get valid feature pairs, even while having them. Added a special case for when the hole is triangular to reduce compute time.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9825User:Tandoorichick/GSoC2016/Logs2016-08-20T00:38:57Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.<br />
<br />
17/8/16 - Testing with meshes to figure out the point of breaking. Wrote blogs for weeks missed.<br />
<br />
18/8/16 - Started with taking tolerance as user input. Errors popped up. Could not identify what was causing them even after falling back to old code.<br />
<br />
19/8/16 - Build error resolved. Added feature to take in zipper tolerance as user input. Debugged with Daniel's suggestions. Error seems to be with setting the incident face reference - because of the orientation checking. With the spheres the origin was within the whole sphere, so orientation was consistent. With the torus, the origin is not inside the object, so inconsistencies with orientation don't allow some edges to get the right incident face. Hence, the next and previous references get messed up too. Yet to think of a fix.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9824User:Tandoorichick/GSoC2016/Logs2016-08-18T18:21:17Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.<br />
<br />
17/8/16 - Testing with meshes to figure out the point of breaking. Wrote blogs for weeks missed.<br />
<br />
18/8/16 - Started with taking tolerance as user input. Errors popped up. Could not identify what was causing them even after falling back to old code.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9820User:Tandoorichick/GSoC2016/Logs2016-08-17T23:35:39Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.<br />
<br />
17/8/16 - Testing with meshes to figure out the point of breaking. Wrote blogs for weeks missed.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9819User:Tandoorichick/GSoC2016/Logs2016-08-16T20:17:46Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.<br />
<br />
16/8/16 - Debugging errors in making the DCEL, with a torus.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9815User:Tandoorichick/GSoC2016/Logs2016-08-15T19:56:17Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).<br />
<br />
15/8/16 - Debugging the coplanar condition addition while finding the closest edge.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9814User:Tandoorichick/GSoC2016/Logs2016-08-12T21:37:20Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.<br />
<br />
12/8/16 - Outlining skewed lines support for 3-D lines (while calculating feature).</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9805User:Tandoorichick/GSoC2016/Logs2016-07-26T19:48:02Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.<br />
<br />
21/7/16 - Came up with results.<br />
<br />
22/7/16 - Fell ill again<br />
<br />
26/7/16 - Made changes according to Daniel's suggestions.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9801User:Tandoorichick/GSoC2016/Logs2016-07-20T18:15:55Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.<br />
<br />
19/7/16, 20/7/16 - Was not well. Couldn't spend much time. Fixing two hemispheres works okay, but needs more testing.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9800User:Tandoorichick/GSoC2016/Logs2016-07-18T18:40:16Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.<br />
<br />
17/7/16 - Weekend<br />
<br />
18/7/16 - Had to test a few times with a mesh that needs no healing. Made changes for the case when the defect is a square (the normal case does not work, special case was written for a square) - works fine. Created two disconnected hemispheres on Blender to test, and exported the geometry as an .obj file. Testing it.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9799User:Tandoorichick/GSoC2016/Logs2016-07-16T17:55:20Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.<br />
<br />
16/7/16 - Cleared out dead code. Wrote includes properly. Added a bit of stitching code.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9796User:Tandoorichick/GSoC2016/Logs2016-07-15T18:54:20Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.<br />
<br />
15/7/16 - Zippering gaps module works fine. Need to test with other meshes where the tolerance and the size of the triangles is not so comparable.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9795User:Tandoorichick/GSoC2016/Logs2016-07-14T20:37:19Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.<br />
<br />
14/7/16 - Changes could be seen. But with distorted triangles. Changes for orientation check was added. Works. Few more cases of erroneous detection of feature edges, looking into them.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9794User:Tandoorichick/GSoC2016/Logs2016-07-13T22:26:15Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.<br />
<br />
13/7/16 - Memory issues resolved. Found cases where triangles might cross over each other due to the transformations. Thus, need to check if the orientation of the triangle changes. Changes made in the rt_bot_internal struct pointer not being reflected with draw. Need to figure out.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9793User:Tandoorichick/GSoC2016/Logs2016-07-12T18:38:45Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.<br />
<br />
12/7/16 - deleteEdge() function changed to cope with the degeneracy wrt orientation. Works fine. Checking the functions that might be causing the memory issues. Added changes to stitching algorithm.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9791User:Tandoorichick/GSoC2016/Logs2016-07-11T19:06:04Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Facelist starting edge references are out of place. Degenerate cases wrt orientation of triangles causing those issues. Changes to stitching gaps module outline.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9790User:Tandoorichick/GSoC2016/Logs2016-07-11T18:51:36Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.<br />
<br />
10/7/16 - Weekend<br />
<br />
11/7/16 - Issues with vertex contraction resolved. Incident face references are out of place. Changes to stitching gaps module outline.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9789User:Tandoorichick/GSoC2016/Logs2016-07-09T20:22:15Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.<br />
<br />
9/7/16 - Zippering gaps modified to include boundary edges. bool vector is used to avoid multiple checks to the same chain of edges. Stitching gaps algo modified slightly. Zippering - vertex contraction has not been done right. Debugging.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9788User:Tandoorichick/GSoC2016/Logs2016-07-08T18:41:40Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.<br />
<br />
8/7/16 - Held up with some other work. Thought about changes to the existing zipper module code, and the stitching algo.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9786User:Tandoorichick/GSoC2016/Logs2016-07-07T19:16:27Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.<br />
<br />
7/7/16 - Tried fixing the memory corruption error with the priority queue, but couldn't. Check the stitching algorithm code. Went through the overlaps fixing algorithm for coding.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9785User:Tandoorichick/GSoC2016/Logs2016-07-06T18:30:03Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.<br />
<br />
6/7/16 - Coded the rest of the stitching algorithm. Included a part in the zippering gaps algorithm to accommodate for gaps that are square in shape (in which case none of the vertices on the chain would have any valid feature - hence it needs to be treated separately). Changed some function parameters to const as Daniel had suggested.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9781User:Tandoorichick/GSoC2016/Logs2016-07-05T19:30:29Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.<br />
<br />
5/7/16 - Memory corruption issue wrt push operation with priority queue. Looked for solutions. Couldn't find any fix. Coding the stitching algorithm. Made changes from yesterday - that both chains move in opposite directions by virtue of being a part of the same loop.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9780User:Tandoorichick/GSoC2016/Logs2016-07-04T19:27:35Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.<br />
<br />
3/7/16 - Corrected minor errors.<br />
<br />
4/7/16 - Next and previous edge references set right after the contractions. Sorted out memory issues, changed function prototypes accordingly. Parameters with double pointers changed to reflect that they are 3D arrays. Undefined behavior w.r.t even memory issues seen. Trying to resolve. Started coding stitching algorithm.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9779User:Tandoorichick/GSoC2016/Logs2016-07-02T20:20:14Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.<br />
<br />
1/7/16 - Errors with function addEdge rectified. Setting references while deleting edge modified. <br />
<br />
2/7/16 - Rectified errors with delete functions. Edge contraction and vertex contraction processes working fine.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9776User:Tandoorichick/GSoC2016/Logs2016-06-30T18:06:39Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.<br />
<br />
30/6/16 - Still modifying the DCEL access functions. Wasn't well for a part of the day.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9775User:Tandoorichick/GSoC2016/Logs2016-06-29T19:30:36Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.<br />
<br />
29/6/16 - Errors with the functions modifying the DCEL. Rectifying them.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9773User:Tandoorichick/GSoC2016/Logs2016-06-29T04:19:15Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.<br />
<br />
27/6/16 - Resolving memory corruption errors<br />
<br />
28/6/16 - Made changes in the zipperGaps() function. Tested them. Errors in logic still exist in some of them. Looking into it.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9769User:Tandoorichick/GSoC2016/Logs2016-06-27T06:44:31Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.<br />
<br />
25/6/16 - Figured out way to separate the boundary of a mesh from the defects (using orientation). Till initization of the priority queue works fine (finding free edge chain, finding closest edge for those, calculating error and inserting into the priority queue. Memory corruption error with the zipperGaps() function. I'm trying to resolve it.<br />
<br />
26/6/16 - Resolved one memory corruption error. Another popped up with the priority queue. Finding ways to resolve that.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9767User:Tandoorichick/GSoC2016/Logs2016-06-24T21:33:41Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.<br />
<br />
24/6/16 - Changed logic for closest edge function, to handle feature edge and feature vertex properly. Works for most cases. Rest yet to be fixed.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9766User:Tandoorichick/GSoC2016/Logs2016-06-23T19:53:48Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.<br />
<br />
23/6/16 - Tested code. Conversion module gets DCEL to shape. Testing of zippering gaps going on.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9765User:Tandoorichick/GSoC2016/Logs2016-06-22T19:02:08Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.<br />
<br />
22/6/16 - Error while linking C++ code to C. Started with stitching in the meanwhile. Compiled module later on. Started debugging.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9761User:Tandoorichick/GSoC2016/Logs2016-06-21T20:46:14Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.<br />
<br />
21/6/16 - Modified code for finding closest edge. And modified code to conform to BRL-CAD coding standards. Uploaded modified patch on SourceForge. Started work with stitching gaps since compilation was unsuccessful. Got solution, made changes. Yet to compile successfully.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9758User:Tandoorichick/GSoC2016/Logs2016-06-20T18:51:03Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.<br />
<br />
20/6/16 - Wrote analyse_heal_bot to link to the TCL command. Function to find free edge chains that are not loops was also written. Including C++ headers in the MeshConversion.h file gives errors while including MeshConversion.h in src/libwdb/bot.c for analyse_heal_bot(). Yet to figure out. Went through earlier code to correct any apparent mistakes.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9757User:Tandoorichick/GSoC2016/Logs2016-06-20T05:20:58Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.<br />
<br />
17/6/16 - Had to write TCL command binding again (because i had checked out revision without saving the work). Analysed the closest edge function logic.<br />
<br />
18/6/16 - Personal commitments<br />
<br />
19/6/16 - Moved header files around to include directory, but undid. Build errors due to missing headers when i included a header file in the existing code. Asked for help on the IRC.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9754User:Tandoorichick/GSoC2016/Logs2016-06-17T07:52:52Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16 - Set up the BrlcadMesh class and defined functions. Implemented few geometry utility functions - orientation checking. Went through source to find function function: rt_bot_same_orientation() to check if an edge and a triangle are oriented the same way.<br />
<br />
28/5/16 - Vertex record functions definition<br />
<br />
29/5/16 - Face record functions definition<br />
<br />
30/5/15 - Edge record functions definition<br />
<br />
31/5/16 - Setting up OpenSCAD and going through the code. Little bit confusion regarding the Vector3D variable. <br />
<br />
1/6/16 - Implemented some geometry util functions - checking if two triangles are oriented the same way, calculating determinant. Face record functions<br />
<br />
2/6/16 - Vertex record functions and some of edge record functions<br />
<br />
3/6/16 - Edge record functions<br />
<br />
4/6/16 - Classes' design changes. Functions common to both native structures were implemented in the PolygonalMesh class itself.<br />
<br />
5/6/16 - UI commands support - added a dummy command "heal" and tested with a sample message<br />
<br />
6/6/16 - Changes in the conversion module code according to Daniel's suggestions<br />
<br />
7/6/16 - Defined the queue element for the zipper gaps algorithm, set up the files and started with outline. <br />
<br />
8/6/16 - Wrote functions for initializing priority queue and listed out other utility functions that might be needed<br />
<br />
9/6/16 - Function to zipper gaps<br />
<br />
10/6/16 - Implemented utility functions - finding orthogonal projection, calculating feature pair, etc.<br />
<br />
11/6/16 - Out of station<br />
<br />
12/6/16 - Out of station<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source. Functions to update the DCEL structure - like splitting a face, inserting a vertex on an edge<br />
<br />
14/6/16 - Created a separate header Geometry.h to keep all geometry related functions like finding if a point can be orthogonally projected to a line, find such a projection, distance between two points, distance between a point and a line, etc. Continued writing functions to update the DCEL structure and inserted calls to them. <br />
<br />
15/6/16 - Wrote utility functions for accessing and updating the rt_bot_internal structure. <br />
<br />
16/6/16 - Had set the unbounded face id to be the number of faces initially, changed that after facing problems while adding and deleting faces. Updated all relevant functions. Came up with an approach for finding the closest edge that does not cross any existing vertex/edge/face. Solved other errors. Built code successfully.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9752User:Tandoorichick/GSoC2016/Logs2016-06-16T07:37:11Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16, 28/5/16 - Defined the virtual functions in the BRL-CAD conversion file.<br />
<br />
29/5/16, 30/5/15 - Completed BRL-CAD conversion file and compiled<br />
<br />
31/5/16 - Setting up OpenSCAD<br />
<br />
1/6/16 - 3/6/16 - OpenSCAD functions<br />
<br />
4/6/16 - Classes' design changes<br />
<br />
5/6/16 - UI commands support<br />
<br />
6/6/16 - Changes in the conversion module code<br />
<br />
<br />
7/6/16, 8/6/16 - Laid outline of the overall algorithm and defined the utility functions<br />
<br />
9/6/16 - 12/6/16 - Implemented utility functions required for the algorithm<br />
<br />
13/6/16 - Set up the module inside the libanalyze folder in the BRL-CAD source<br />
<br />
14/6/16, 15/6/16 - Completed remaining utility functions and the virtual methods to access the rt_bot_internal structure</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9734User:Tandoorichick/GSoC2016/Logs2016-06-09T13:38:19Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16, 28/5/16 - Defined the virtual functions in the BRL-CAD conversion file.<br />
<br />
29/5/16, 30/5/15 - Completed BRL-CAD conversion file and compiled<br />
<br />
31/5/16 - Setting up OpenSCAD<br />
<br />
1/6/16 - 3/6/16 - OpenSCAD functions<br />
<br />
4/6/16 - Classes' design changes<br />
<br />
5/6/16 - UI commands support<br />
<br />
6/6/16 - Changes in the conversion module code<br />
<br />
7/6/16, 8/6/16 - Implementing zippering gaps</div>Tandoorichickhttps://brlcad.org/w/index.php?title=File:Selection_020.png&diff=9732File:Selection 020.png2016-06-05T15:40:09Z<p>Tandoorichick: </p>
<hr />
<div></div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9731User:Tandoorichick/GSoC2016/Logs2016-06-05T15:35:20Z<p>Tandoorichick: /* Development Logs */</p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16, 28/5/16 - Defined the virtual functions in the BRL-CAD conversion file.<br />
<br />
29/5/16, 30/5/15 - Completed BRL-CAD conversion file and compiled<br />
<br />
31/5/16 - Setting up OpenSCAD<br />
<br />
1/6/16 - 3/6/16 - OpenSCAD functions<br />
<br />
4/6/16 - Classes' design changes<br />
<br />
5/6/16 - UI commands support</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9726User:Tandoorichick/GSoC2016/Logs2016-05-28T15:03:32Z<p>Tandoorichick: </p>
<hr />
<div>Blog with week-wise work including all ideation and explanation at: http://tandoorichick.github.io/<br />
<br />
==Development Logs==<br />
<br />
23/5/16, 24/5/16 - Confusion regarding the indexed and unindexed format of BRL-CAD and OpenSCAD -> researched other ways to implement the portable module. Confusion regarding the use of DCEL as well. <br />
<br />
25/5/16 - Outlined the PolygonalMesh abstract class. Listed out the functions that will be required for the conversion from PolygonalMesh to the DCEL.<br />
<br />
26/5/16 - Outlined the doubly-connected edge list class. Declared virtual functions (that will obtain information from the intermediate mesh to convert to the DCEL) in the PolygonalMesh abstract class. Others will be added later on when the need arises.<br />
<br />
27/5/16, 28/5/16 - Defined the virtual functions in the BRL-CAD conversion file.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=Google_Summer_of_Code/2016&diff=9725Google Summer of Code/20162016-05-28T15:00:37Z<p>Tandoorichick: /* Automatic Polygonal Mesh Healing */</p>
<hr />
<div>= GSoC 2016 With BRL-CAD =<br />
<br />
'''BRL-CAD was accepted as a [https://summerofcode.withgoogle.com mentoring organization] for the Google Summer of Code!'''<br />
<br />
We accepted '''9''' students that prepared quality proposals and demonstrated commitment, with details below for those students that were successful. As an umbrella org, several students were selected for associated orgs LibreCAD, OpenSCAD, and FreeCAD.<br />
<br />
= Accepted Projects =<br />
<br />
== Automatic Polygonal Mesh Healing ==<br />
* Adding mesh healing features to BoT<br />
* Student: [[User:tandoorichick|Rakshika Bagavathy]]<br />
* [https://summerofcode.withgoogle.com/projects/#5901122497675264 Abstract]<br />
* [[User:tandoorichick/GSoC2016/Project |Project Plan]]<br />
* [[User:tandoorichick/GSoC2016/Logs |Development Logs]]<br />
<br />
== BRL-CAD Web Infrastructure Update ==<br />
* Create brand new main website and wiki update<br />
* Student: [[User:Oleksandr_dubenko|Oleksandr Dubenko]]<br />
* [https://summerofcode.withgoogle.com/projects/#6118551983226880 Abstract]<br />
* [https://blog.esde.name/project-plan/ Project Plan]<br />
* [https://blog.esde.name/ Development Logs]<br />
<br />
== User Interface for Customizing Models ==<br />
* Create user interface to Customize Model interactively instead of modifying them manually.<br />
* Student: [[User:Amarjeet_Singh_Kapoor|Amarjeet Singh Kapoor]]<br />
* [https://summerofcode.withgoogle.com/projects/#6243883906236416 Abstract]<br />
* [[User: Amarjeet_Singh_Kapoor/GSoC2016/Project |Project Plan]]<br />
* [https://amarjeetkapoor1.wordpress.com/ Development Logs ]<br />
<br />
== GPGPU Support for Boolean Evaluation Used in Ray Tracing ==<br />
* Accelerate Boolean Evaluation using a GPU, if available.<br />
* Student: [[User:catchchaos|Param Hanji]]<br />
* [https://summerofcode.withgoogle.com/projects/#6520583684620288 Abstract]<br />
* [[User:Catchchaos/GSoC2016/Proposal|Project Plan]]<br />
* [https://catchchaos.wordpress.com/ Development Logs]<br />
<br />
== LibreCAD 3 Scriptable User Interface Creation ==<br />
* Create GUI for operations and allow it to be modified without recompilation<br />
* Student: [[User:Feragon.xi|Florian Roméo]]<br />
* [https://summerofcode.withgoogle.com/projects/#5170062377877504 Abstract]<br />
* [[User:Feragon.xi/GSoC2016/Project |Project Plan]]<br />
* [https://gsoc16.feragon.net/ Development Logs]<br />
<br />
== LibreCAD V3 Bezier and FILE I/O==<br />
* Adding support of beziers and DXF output to LibreCAD_3<br />
* Student: [[User:Gaganjyotsingh|Gaganjyot Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#5263377253269504 Abstract]<br />
* [https://codebasement.wordpress.com/bio/ Project Plan]<br />
* [https://codebasement.wordpress.com Development Logs]<br />
<br />
== Online Geometry Viewer ==<br />
* Making [https://github.com/BRL-CAD/OGV-meteor OGV] production ready and available to use for a wider majority of people.<br />
<br />
* Student: [[User:Gauravjeet|Gauravjeet Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#4756339498680320 Abstract]<br />
* [http://gauravjeetsingh.github.io/proposal/ Project Plan]<br />
* [http://gauravjeetsingh.github.io/ Development Logs]<br />
<br />
== Plate Mode NURBS raytracing ==<br />
* Implementing plate mode raytracing for NURBS surfaces<br />
* Student: [[User:bojian_ustc|Bojian Wu]]<br />
* [https://summerofcode.withgoogle.com/projects/#6255437804470272 Abstract]<br />
* [[User:bojian_ustc/GSoC2016/Project |Project Plan]]<br />
* [http://bojianwu.github.io Development Logs]<br />
<br />
== The FreeCAD Plugin Installer ==<br />
* The main idea is to implement a plugin manager for FreeCAD that will be used to install/remove/update plugins and other unofficial workbenches or modules and macros.<br />
* Student: [[User:mandeeps708|Mandeep Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#5341872155262976 Abstract]<br />
* [[User:Mandeeps708/gsoc_proposal |Project Plan]]<br />
* [[User:Mandeeps708/GSoC16/logs|Development Logs]]<br />
* [https://mandeep7.wordpress.com Blog]</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Project&diff=9721User:Tandoorichick/GSoC2016/Project2016-05-22T10:37:08Z<p>Tandoorichick: /* Development Schedule: */</p>
<hr />
<div>=Automatic Polygonal Mesh Healing=<br />
<br />
==Existing features==<br />
<br />
Removal of isolated and duplicate vertices in rt_bot_condense() and rt_bot_vertex_fuse() functions in src/librt/primitives/bot/bot.c<br />
Removal of dangling edges and and decimation of edges by removing the faces that contain that edge, the edges that those faces contain and changing references of one vertex of the edge to the other all functions in decimate.c in src/librt/primitives/bot<br />
Fusing of equivalent faces in rt_bot_face_fuse in src/librt/primitives/bot/bot.c<br />
<br />
==Changes that could be incorporated in the existing code==<br />
The current code uses bin sorting to check for duplicate vertices. While it is true that it works in O(n) time on an average, the worst case complexity is O(n²). This might happen when all the vertices have the same x-coordinate. To optimise this, an AVL tree can be used to store the vertices and check if any vertex that is yet to be checked is equivalent to (is within the merge tolerance of) any existing point. This method works in O( n*logn) on an average.<br />
<br />
In the existing bot_edge structure, the faces containing it can be added as well. This functionality will be used when we check for singular vertices and while removing redundant elements while checking for overlaps in the mesh. Without this topological information of face adjacencies, if we need to check for adjacent faces, O(n) time will be required. But with it being set, it will be reduced to O(1). <br />
<br />
==Detailed Description of the Project:==<br />
'''Features to be added (inclusive of tasks to be done if time permits):'''<br />
<br />
===Removal of gaps and T-joints===<br />
Two approaches will be used - Zippering and Stitching. Both methods will be implemented and which method to use will be decided based on a tolerance for small and large gaps (user inputs). Stitching is used when the gaps are slightly larger - when they are small enough to be gaps but not large enough to be holes.<br />
<br />
It is easy to detect boundaries of polygonal chains; they can done through the presence of free edges (there is support for this in the existing bot_edge structure). When there is any vertex/edge close to it within the merge tolerance (and not inside it) - zippering or stitching can be performed based on the tolerance. <br />
<br />
'''Subdivisions:'''<br />
<br />
'''1. Zippering:'''<br />
<br />
We identify the the boundary chains of the mesh. <br />
For all the boundary vertices, we find the nearest boundary edge that is non-incident to the vertex. <br />
If an orthogonal projection of the said vertex on the found edge is possible, the edge is stored as the paired feature. Else, the nearest vertex of the edge is stored. <br />
For each of the feature pairs, the distance between them is computed and stored as an error measure. <br />
Then, all the feature pairs are sorted according to that error measure and stored in a priority queue.<br />
We pop the the feature pair with the least error measure.<br />
If the feature is a vertex, vertex contraction is performed. Vertex contraction: If the BoT has mode surf, plate or plate_nocos, we just find the midpoint of the line connecting the vertices and place both the points there. If the mode is volume, we find the midpoint of the line formed by the intersection of the two tangential planes at both the boundaries. This is the vertex that the initial two vertices are moved to. <br />
Else if the feature is an edge, edge contraction is performed. This is the case of T-joints. The boundary vertex is projected on to the said feature pair (the edge). The triangle which contains the edge is split at that vertex. And then vertex contraction of the boundary vertex and the projected vertex is done. This method works for all the BoT modes. <br />
<br />
Note: It will be taken care not to introduce any singular elements at this stage<br />
<br />
'''Pseudo code:'''<br />
<br />
'''ZIPPER_GAPS (PQUEUE):'''<br />
<br />
Vertex V ←POP_MINIMUM (PQUEUE)<br />
Feature F ← NEAREST_FEATURE (V)<br />
if f is a vertex then<br />
VERTEX_CONTRACTION (V, F)<br />
else<br />
VERTEX_EDGE_CONTRACTION (V, F)<br />
EdgeSet E ← MODIFIED_EDGES<br />
for all e ∊ E do<br />
for all v ∊ {CORRESPONDING_FEATURES (e)} do<br />
MAINTAIN_CORRESPONDENCES (v)<br />
REINSERT (v)<br />
end for<br />
end for<br />
<br />
<br />
Where,<br />
'''ZIPPER_GAPS (PQUEUE) '''zippers the pair with the least error distance<br />
<br />
'''POP_MINIMUM (PQUEUE) '''pops the element with minimum error distance from the priority queue PQUEUE. <br />
<br />
'''NEAREST_FEATURE (V) '''gives the nearest feature pair of the vertex V.<br />
<br />
'''VERTEX_CONTRACTION (V, F)''' and VERTEX_EDGE_CONTRACTION (V, F) perform contraction of the the vertex V with its feature pair F.<br />
<br />
'''MODIFIED_EDGES () '''returns the set of all edges that are modified after the contraction routines.<br />
<br />
'''CORRESPONDING_FEATURES (e)''' returns the set of all vertices whose feature pair the edge e (from the modified set) is. <br />
<br />
'''MAINTAIN_CORRESPONDENCES (v)''' updates the feature pair of the vertex v after the modification of the edges.<br />
<br />
'''REINSERT (v)''' reinserts the vertex v into PQUEUE.<br />
<br />
<br />
'''2. Stitching:'''<br />
<br />
We have two input polygonal chains that are within the tolerance (for gap stitching). <br />
We start with one of any chain and merge them as if they were sorted lists. <br />
In each step we have pointers to the current vertex on each of the chains (vertices - u and v) and we advance the pointer on one of the chains according to some advancing rules, say to vertex w. <br />
Now we make a triangle uvw, unoriented (if the rest of the mesh is unoriented) or with orientation that is same as the rest of the mesh (CW or CCW). <br />
When we reach the last vertex on one chain we advance the pointer only on the other chain. We terminate when we have reached the last vertices on both the chains. <br />
<br />
'''The advancing rule: '''Whichever triangle has the least perimeter, the pointer is advanced on the chain whose edge is present in the above-mentioned triangle. Formulating this: <br />
<br />
This advancing rule has been seen to give the best results. <br />
<br />
'''Pseudo code:'''<br />
<br />
'''STITCH_GAPS (MESH_A, MESH_B):'''<br />
//MESH_A and MESH_B denote the boundaries of the two meshes to be stitches (essentially a sequence a vertices)<br />
u ← STARTING_VERTEX (MESH_A)<br />
v ← STARTING_VERTEX (MESH_B)<br />
while both meshes haven’t reached their terminal vertices<br />
u′ ← NEXT_VERTEX (MESH_A, u)<br />
v′ ← NEXT_VERTEX (MESH_B, v)<br />
if PERIMETER ( u, u’, v) < PERIMETER ( u, v, v’ ) then<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
else <br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
while MESH_A has vertices left<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
while MESH_B has vertices left<br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
<br />
Where,<br />
'''STARTING_VERTEX (MESH)''' returns the starting vertex in the sequence of vertices in MESH.<br />
<br />
'''NEXT_VERTEX (MESH, a)''' returns the vertex after a in the sequence.<br />
MESH<br />
<br />
'''PERIMETER ( a, b, c)''' returns the perimeter of the triangle formed by the three vertices a, b, and c.<br />
<br />
'''MAKE_TRIANGLE (a, b, c)''' adds the triangle formed by the three vertices to the list of faces.<br />
<br />
'''ADVANCE_POINTER (MESH, a)''' updates the current vertex pointer from a to the next vertex in MESH.<br />
<br />
===Removal of overlaps: ===<br />
<br />
Clipping one mesh against another and removing small triangles formed if any. Overlaps are detected by checking if there are any vertices/edges close to a boundary vertex within the merge tolerance (and inside the boundary). <br />
<br />
'''Steps involved:'''<br />
<br />
'''1. Removal of redundant surfaces of the mesh: '''<br />
<br />
General idea is to eat away at both the mesh boundaries until the two meshes just meet. We repeat the process of redundancy removal until both the meshes in consideration (say, mesh A and mesh B) are unchanged. Redundancy checking done through the nearest_on_mesh(P, d, M) routine, which returns the nearest point on mesh M to the point P within a distance of d, or nothing if no such point exists. This function will be written. <br />
<br />
'''2. Clipping one mesh against another: '''<br />
<br />
The next step is clipping mesh A against the boundary of mesh B. We introduce new vertices on the boundary of mesh B where edges of the boundary triangles of mesh A intersect it. The set of new vertices added and the existing boundary vertices of mesh B form the final vertices of the mesh boundary between the meshes A and B. The boundary triangles of mesh B are split at the new vertices. Degenerate triangles might be introduced (which will be solved later). The region of the boundary triangles of mesh A inside the boundary of mesh B is discarded (clipped away) and the region outside this boundary is retained. The portion of mesh A that is retained can be triangulated using the stitching routine, that has already been discussed. Any degeneracies introduced will be handled later.<br />
<br />
A bag of triangles of created out of the retained portion in mesh A and it can be combined with the rest of the mesh using the rt_bot_merge function in src/librt/primitives/bot/bot.c<br />
<br />
'''3. Removal of the small triangles introduced during clipping: '''<br />
<br />
This will be done as a part of the degeneracy removal.<br />
<br />
Adapting this algorithm to 3 dimensions is easy. What we do is, we thicken the mesh boundary of mesh B. A wall runs around the mesh boundary which is roughly perpendicular to the mesh at all points. The wall is a collection of four triangles at each edge E. To find the intersection, see where the boundary of mesh A intersects the wall. Project this point onto the edge E. The rest of the algorithm is same as what is mentioned above. <br />
<br />
<br />
<br />
===Triangulation of large holes: ===<br />
<br />
Simple and ring holes (complex). A simple hole is a hole of any shape with only one boundary loop. A ring hole contains at least two peripheral loops. <br />
<br />
Hole-filling algorithms should possess the following properties:<br />
1. Able to cover an arbitrary hole for any model (robustness)<br />
2. Capable of filling large holes in a reasonable amount of time (efficiency)<br />
3. Enable the patched surface to match the missing geometry well (precision)<br />
<br />
'''Procedure for simple holes: '''<br />
<br />
'''1. Detecting the hole boundary: '''<br />
<br />
To check if a vertex is a boundary vertex, we check the number of 1-ring vertices and 1-ring edges. If the two numbers are not equal, then it is a boundary vertex. When we get a seed boundary vertex, we trace along the path of the boundary edges. If we get a loop, we’ve identified a hole. In this manner, all holes can be identified. <br />
<br />
'''2. Using the Advancing front algorithm to create the mesh: '''<br />
<br />
The situations are divided into three cases, based on the minimum angle (say, ɑ) between two adjacent edges of a free element (in a closed loop):<br />
<br />
(i) ɑ ≤ 75° - Make a triangle out of the two edges of the free elements.<br />
<br />
(ii) 75° < ɑ ≤ 135° - Make two equilateral triangles out of the two free elements’ edges. The two normal vectors are obtained by averaging the common vertex and the vertex at the other end of the edge in the said triangle. These normals are obtained by averaging the 1-ring vertices of each vertex. The two new nodes that are formed are averaged and merged. Whenever any new node is added, it is checked whether this node is within the tolerance of any other existing node, and if it is, it is merged with that node. If not, no action is performed. <br />
<br />
(iii) ɑ > 135° - Make two equilateral triangles corresponding to the two free elements’ edges. <br />
<br />
<br />
<br />
<br />
'''Complex/Ring holes:''' <br />
<br />
Two approaches can be taken.<br />
<br />
(i) Disregard the island patch and treat it as a simple hole, but this approach reduces fidelity. <br />
<br />
(ii) Keep the island patch and mesh only the missing parts. <br />
<br />
(a) This could be done by identifying corresponding elements on the inner and the outer loop and finding the shortest bridge between the two but it is a specific case. <br />
<br />
(b) Another approach could be to use the AFM technique to mesh until the triangles being added just overlap with the existing island meshes. Then we use the technique which was mentioned for overlaps, where we clip the newly added mesh with the existing mesh. <br />
<br />
Which method to employ will be decided based on the number of island meshes and the presence of corresponding vertices on the inner and outer loop, after discussions with the mentor. <br />
<br />
<br />
===Removal of degenerate faces (will be completed if time permits):===<br />
<br />
User input: Face factor and tolerance edge length.<br />
<br />
A triangle is labelled degenerate if it has an angle either too acute (≤ ∊)- needle, or too obtuse( ≥ π - ∊) - cap.<br />
Cap and Needle: <br />
<br />
<br />
Done by element reconstruction algorithm - nodal merging and edge swapping (to improve the overall quality of the mesh). <br />
Edge swapping done by changing the connectivity of the common edge between the two connecting triangles. Any element with edge lengths lesser than that will face removal or reconstruction. If the face factor of the element is less than the user input, it will undergo removal by nodal merging. If not, it undergoes edge swapping. <br />
<br />
E is the equilateral factor a triangle. A triangle with E = 0 is an equilateral triangle. The maximum value of E is ⅔ ², which is also the most undesirable value. Thus, we put that value as the constant while calculating the shape factor, f.<br />
<br />
===Manifold connectivity (will be completed if time permits): ===<br />
<br />
<br />
'''Criteria for manifold surfaces:'''<br />
<br />
a. Every edge is shared by exactly two faces (absence of singular edges)<br />
<br />
b. Every vertex is surrounded by a single cycle of faces and edges (absence of singular vertices): These could be formed by duplicate vertices reduction (to reduce the amount of space used). So it will be taken care that, vertices condensation will take place before this step.<br />
<br />
(i) Singular edges have constituent singular vertices. They are first removed through cutting. <br />
<br />
(ii) Each vertex has a list of faces that reference it. Around a vertex, when one cycle of connected components are found, if the number of faces in that cycle is not equal to the total number of faces that contain the vertex (valency), then it is singular. <br />
<br />
(iii) By going through the face list of singular vertices, the number of connected components can be found. If there are n connected components, make n - 1 copies of the vertex and assign each of the connected components discrete labels of the vertex. This makes the mesh devoid of singular vertices. <br />
<br />
(iv) At this step we have removed all singular vertices and edges, but we would like to stitch together some of the erstwhile singular edges to preserve the geometry.<br />
<br />
(v) Stitching of edges can take place only when the configuration after stitching does not produce any singular elements. <br />
<br />
(vi) Stitching of two edges can take place when the faces containing the edge have the same normal. This condition is subject to change. <br />
<br />
c. Shells must have consistent orientations <br />
<br />
There is support for this in the existing code. We check if each face if oriented according what is mentioned in the rt_bot_internal structure (if it is oriented, that is), and if not we flip the orientation. <br />
<br />
==Links to the algorithms I intend to use:==<br />
<br />
1. AVL Tree method for vertex merging - Generating Topological Information from a "Bucket of Facets" - Rock and Wozny, 1992.<br />
<br />
2. Zippering algorithm for gap and T - joint closing - Progressive Gap Closing for Mesh Repairing, Borodin et. al, 2002, Stitching and Filling: Creating Conformal Faceted Geometry, Patel et. al, <br />
<br />
3. Stitching algorithm for gap and T - joint closing - Filling gaps in the boundary of a Polyhedron, Barequet and Sharir.<br />
<br />
4. Removal of overlaps - Zippered polygon meshes from range images, Turk and Levoy.<br />
<br />
5. Triangulation of holes - A robust hole-filling algorithm for triangular mesh, Zhao et. al.<br />
<br />
6. Removal of degeneracies - Automatic mesh-healing technique for model repair and finite element model generation, Chong, Senthil Kumar, Lee.<br />
<br />
==Deliverables:==<br />
Patch containing functions for removal of gaps and T-joints.<br />
Patch containing functions for removal of overlaps.<br />
Patch containing functions for triangulation and correcting of holes.<br />
Patch containing functions to identify all the defects and set the right callbacks<br />
<br />
==Development Schedule:==<br />
<br />
'''Community Bonding Period:''' The exact layout of where in the codebase to include all the functionalities will be discussed with the mentor and decided. Certain situation have ambiguities as to which approach to take; this will also be clarified. Other than that, suggestions for improvements on proposed methods will also be taken from the mentors. <br />
<br />
*'''Week 1 (May 23rd to May 29th):''' Conversion process for the portable module<br />
<br />
*'''Week 2 (May 30th to June 5th):''' Front end for the mesh healing<br />
<br />
*'''Week 3 (June 6th to June 12th):''' Gaps and T-joints - Zippering<br />
<br />
*'''Week 4 (June 13th to June 19th):''' Gaps and T-joints - Stitching<br />
<br />
*'''Week 5 (June 20th to June 26th):''' Gaps and T-joints - Testing<br />
<br />
*'''Week 6 (June 27th to July 3rd):''' Overlaps fixing<br />
<br />
*'''Week 7 (July 4th to July 10th):''' Overlaps - testing<br />
<br />
*'''Week 8 (July 11th to July 17th):''' Hole - filling using AFM<br />
<br />
*'''Week 9 (July 18th to July 24th):''' Hole - filling testing<br />
<br />
*'''Week 10, 11 (July 25th to August 7th):''' Detection of all errors in meshes and setting the appropriate callbacks to existing features and added features.<br />
<br />
*'''Week 12, 13 (August 8th to August 23rd):''' Buffer period. Code cleanup and final testing of all functionalities. Documentation. <br />
<br />
'''If time permits:'''<br />
<br />
Manifold connectivity checking of the meshes.<br />
Degeneracy removal<br />
Make a command ‘heal’ with parameters - small gap tolerance, large gap tolerance, minimum edge length allowed, face factor. And provision could also be made to skip any particular step in the mesh healing process. <br />
<br />
These parts are less essential to mesh healing than fixing gaps, holes, etc. are. Thus, if I end up going ahead of the schedule, these tasks will be done. If not, they will be done after the GSoC coding period ends.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=Google_Summer_of_Code/2016&diff=9720Google Summer of Code/20162016-05-20T15:43:00Z<p>Tandoorichick: /* Automatic Polygonal Mesh Healing */</p>
<hr />
<div>= GSoC 2016 With BRL-CAD =<br />
<br />
'''BRL-CAD was accepted as a [https://summerofcode.withgoogle.com mentoring organization] for the Google Summer of Code!'''<br />
<br />
We accepted '''9''' students that prepared quality proposals and demonstrated commitment, with details below for those students that were successful. As an umbrella org, several students were selected for associated orgs LibreCAD, OpenSCAD, and FreeCAD.<br />
<br />
= Accepted Projects =<br />
<br />
== Automatic Polygonal Mesh Healing ==<br />
* Adding mesh healing features to BoT<br />
* Student: [[User:tandoorichick|Rakshika Bagavathy]]<br />
* [https://summerofcode.withgoogle.com/projects/#5901122497675264 Abstract]<br />
* [[User:tandoorichick/GSoC2016/Project |Project Plan]]<br />
* [http://tandoorichick.github.io Development Logs]<br />
<br />
== BRL-CAD Web Infrastructure Update ==<br />
* Create brand new main website and wiki update<br />
* Student: [[User:Oleksandr_dubenko|Oleksandr Dubenko]]<br />
* [https://summerofcode.withgoogle.com/projects/#6118551983226880 Abstract]<br />
* [https://blog.esde.name/project-plan/ Project Plan]<br />
* [https://blog.esde.name/ Development Logs]<br />
<br />
== User Interface for Customizing Models ==<br />
* Create user interface to Customize Model interactively instead of modifying them manually.<br />
* Student: [[User:Amarjeet_Singh_Kapoor|Amarjeet Singh Kapoor]]<br />
* [https://summerofcode.withgoogle.com/projects/#6243883906236416 Abstract]<br />
* [[User: Amarjeet_Singh_Kapoor/GSoC2016/Project |Project Plan]]<br />
* [https://amarjeetkapoor1.wordpress.com/ Development Logs ]<br />
<br />
== GPGPU Support for Boolean Evaluation Used in Ray Tracing ==<br />
* Accelerate Boolean Evaluation using a GPU, if available.<br />
* Student: [[User:catchchaos|Param Hanji]]<br />
* [https://summerofcode.withgoogle.com/projects/#6520583684620288 Abstract]<br />
* [[User:Catchchaos/GSoC2016/Proposal|Project Plan]]<br />
* [https://catchchaos.wordpress.com/ Development Logs]<br />
<br />
== LibreCAD 3 Scriptable User Interface Creation ==<br />
* Create GUI for operations and allow it to be modified without recompilation<br />
* Student: [[User:Feragon.xi|Florian Roméo]]<br />
* [https://summerofcode.withgoogle.com/projects/#5170062377877504 Abstract]<br />
* [[User:Feragon.xi/GSoC2016/Project |Project Plan]]<br />
* [https://gsoc16.feragon.net/ Development Logs]<br />
<br />
== LibreCAD V3 Bezier and FILE I/O==<br />
* Adding support of beziers and DXF output to LibreCAD_3<br />
* Student: [[User:Gaganjyotsingh|Gaganjyot Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#5263377253269504 Abstract]<br />
* [https://codebasement.wordpress.com/bio/ Project Plan]<br />
* [https://codebasement.wordpress.com Development Logs]<br />
<br />
== Online Geometry Viewer ==<br />
* Making [https://github.com/BRL-CAD/OGV-meteor OGV] production ready and available to use for a wider majority of people.<br />
<br />
* Student: [[User:Gauravjeet|Gauravjeet Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#4756339498680320 Abstract]<br />
* [http://gauravjeetsingh.github.io/proposal/ Project Plan]<br />
* [http://gauravjeetsingh.github.io/ Development Logs]<br />
<br />
== Plate Mode NURBS raytracing ==<br />
* Implementing plate mode raytracing for NURBS surfaces<br />
* Student: [[User:bojian_ustc|Bojian Wu]]<br />
* [https://summerofcode.withgoogle.com/projects/#6255437804470272 Abstract]<br />
* [[User:bojian_ustc/GSoC2016/Project |Project Plan]]<br />
* [http://bojianwu.github.io Development Logs]<br />
<br />
== The FreeCAD Plugin Installer ==<br />
* The main idea is to implement a plugin manager for FreeCAD that will be used to install/remove/update plugins and other unofficial workbenches or modules and macros.<br />
* Student: [[User:mandeeps708|Mandeep Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#5341872155262976 Abstract]<br />
* [[User:Mandeeps708/gsoc_proposal |Project Plan]]<br />
* [[User:Mandeeps708/GSoC16/logs|Development Logs]]<br />
* [https://mandeep7.wordpress.com Blog]</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Logs&diff=9711User:Tandoorichick/GSoC2016/Logs2016-05-16T21:44:55Z<p>Tandoorichick: Created page with "The plan is to not make a mesh healing module just for BRL-CAD, but a portable module that can be used by both BRL-CAD and OpenSCAD. Blog will be up in a while."</p>
<hr />
<div>The plan is to not make a mesh healing module just for BRL-CAD, but a portable module that can be used by both BRL-CAD and OpenSCAD.<br />
<br />
Blog will be up in a while.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=Google_Summer_of_Code/2016&diff=9708Google Summer of Code/20162016-05-16T17:55:55Z<p>Tandoorichick: /* Automatic Polygonal Mesh Healing */</p>
<hr />
<div>= GSoC 2016 With BRL-CAD =<br />
<br />
'''BRL-CAD was accepted as a [https://summerofcode.withgoogle.com mentoring organization] for the Google Summer of Code!'''<br />
<br />
We accepted '''9''' students that prepared quality proposals and demonstrated commitment, with details below for those students that were successful. As an umbrella org, several students were selected for associated orgs LibreCAD, OpenSCAD, and FreeCAD.<br />
<br />
= Accepted Projects =<br />
<br />
== Automatic Polygonal Mesh Healing ==<br />
* Adding mesh healing features to BoT<br />
* Student: [[User:tandoorichick|Rakshika Bagavathy]]<br />
* [https://summerofcode.withgoogle.com/dashboard/project/5901122497675264/overview/ Abstract]<br />
* [[User:tandoorichick/GSoC2016/Project |Project Plan]]<br />
* [[User:tandoorichick/GSoC2016/Logs|Development Logs]]<br />
<br />
== BRL-CAD Web Infrastructure Update ==<br />
* Create brand new main website and wiki update<br />
* Student: [[User:Oleksandr_dubenko|Oleksandr Dubenko]]<br />
* [https://summerofcode.withgoogle.com/projects/#6118551983226880 Abstract]<br />
* [https://blog.esde.name/project-plan/ Project Plan]<br />
* [https://blog.esde.name/ Development Logs]<br />
<br />
== User Interface for Customizing Models ==<br />
* Create user interface to Customize Model interactively instead of modifying them manually.<br />
* Student: [[User:Amarjeet_Singh_Kapoor|Amarjeet Singh Kapoor]]<br />
* [https://summerofcode.withgoogle.com/projects/#6243883906236416 Abstract]<br />
* [[User: Amarjeet_Singh_Kapoor/GSoC2016/Project |Project Plan]]<br />
* [https://amarjeetkapoor1.wordpress.com/ Development Logs ]<br />
<br />
== GPGPU Support for Boolean Evaluation Used in Ray Tracing ==<br />
* Accelerate Boolean Evauluation using a GPU, if available<br />
* Student: [[User:catchchaos|Param Hanji]]<br />
* [https://summerofcode.withgoogle.com/dashboard/project/5901122497675264/overview/ Abstract]<br />
* [[User:Catchchaos/GSoC2016/Proposal|Project Plan]]<br />
* [https://catchchaos.wordpress.com/ Development Logs]<br />
<br />
== LibreCAD 3 Scriptable User Interface Creation ==<br />
* Create GUI for operations and allow it to be modified without recompilation<br />
* Student: [[User:Feragon.xi|Florian Roméo]]<br />
* [https://summerofcode.withgoogle.com/dashboard/project/5901122497675264/overview/ Abstract]<br />
* [[User:Feragon.xi/GSoC2016/Project |Project Plan]]<br />
* [https://gsoc16.feragon.net/ Development Logs]<br />
<br />
== LibreCAD V3 Bezier and FILE I/O==<br />
* Adding support of beziers and DXF output to LibreCAD_3<br />
* Student: [[User:Gaganjyotsingh|Gaganjyot Singh]]<br />
* [https://summerofcode.withgoogle.com/dashboard/project/5901122497675264/overview/ Abstract]<br />
* [[https://goo.gl/1O2zkV Project Plan]]<br />
* [[https://codebasement.wordpress.com Development Logs]]<br />
<br />
== Online Geometry Viewer ==<br />
* Making [https://github.com/BRL-CAD/OGV-meteor OGV] production ready and available to use for a wider majority of people.<br />
<br />
* Student: [[User:Gauravjeet|Gauravjeet Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#4756339498680320 Abstract]<br />
* [http://gauravjeetsingh.github.io/proposal/ Project Plan]<br />
* [http://gauravjeetsingh.github.io/ Development Logs]<br />
<br />
== Plate Mode NURBS raytracing ==<br />
* Implementing plate mode raytracing for NURBS surfaces<br />
* Student: [[User:bojian_ustc|Bojian Wu]]<br />
* [https://summerofcode.withgoogle.com/dashboard/project/5901122497675264/overview/ Abstract]<br />
* [[User:bojian_ustc/GSoC2016/Project |Project Plan]]<br />
* [http://bojianwu.github.io Development Logs]<br />
<br />
== The FreeCAD Plugin Installer ==<br />
* The main idea is to implement a plugin manager for FreeCAD that will be used to install/remove/update plugins and other unofficial workbenches or modules and macros.<br />
* Student: [[User:mandeeps708|Mandeep Singh]]<br />
* [https://summerofcode.withgoogle.com/projects/#5341872155262976 Abstract]<br />
* [[User:Mandeeps708/gsoc_proposal |Project Plan]]<br />
* [http://mandeep7.wordpress.com Development Logs]</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Project&diff=9681User:Tandoorichick/GSoC2016/Project2016-05-07T19:53:33Z<p>Tandoorichick: /* Removal of gaps and T-joints */</p>
<hr />
<div>=Automatic Polygonal Mesh Healing=<br />
<br />
==Existing features==<br />
<br />
Removal of isolated and duplicate vertices in rt_bot_condense() and rt_bot_vertex_fuse() functions in src/librt/primitives/bot/bot.c<br />
Removal of dangling edges and and decimation of edges by removing the faces that contain that edge, the edges that those faces contain and changing references of one vertex of the edge to the other all functions in decimate.c in src/librt/primitives/bot<br />
Fusing of equivalent faces in rt_bot_face_fuse in src/librt/primitives/bot/bot.c<br />
<br />
==Changes that could be incorporated in the existing code==<br />
The current code uses bin sorting to check for duplicate vertices. While it is true that it works in O(n) time on an average, the worst case complexity is O(n²). This might happen when all the vertices have the same x-coordinate. To optimise this, an AVL tree can be used to store the vertices and check if any vertex that is yet to be checked is equivalent to (is within the merge tolerance of) any existing point. This method works in O( n*logn) on an average.<br />
<br />
In the existing bot_edge structure, the faces containing it can be added as well. This functionality will be used when we check for singular vertices and while removing redundant elements while checking for overlaps in the mesh. Without this topological information of face adjacencies, if we need to check for adjacent faces, O(n) time will be required. But with it being set, it will be reduced to O(1). <br />
<br />
==Detailed Description of the Project:==<br />
'''Features to be added (inclusive of tasks to be done if time permits):'''<br />
<br />
===Removal of gaps and T-joints===<br />
Two approaches will be used - Zippering and Stitching. Both methods will be implemented and which method to use will be decided based on a tolerance for small and large gaps (user inputs). Stitching is used when the gaps are slightly larger - when they are small enough to be gaps but not large enough to be holes.<br />
<br />
It is easy to detect boundaries of polygonal chains; they can done through the presence of free edges (there is support for this in the existing bot_edge structure). When there is any vertex/edge close to it within the merge tolerance (and not inside it) - zippering or stitching can be performed based on the tolerance. <br />
<br />
'''Subdivisions:'''<br />
<br />
'''1. Zippering:'''<br />
<br />
We identify the the boundary chains of the mesh. <br />
For all the boundary vertices, we find the nearest boundary edge that is non-incident to the vertex. <br />
If an orthogonal projection of the said vertex on the found edge is possible, the edge is stored as the paired feature. Else, the nearest vertex of the edge is stored. <br />
For each of the feature pairs, the distance between them is computed and stored as an error measure. <br />
Then, all the feature pairs are sorted according to that error measure and stored in a priority queue.<br />
We pop the the feature pair with the least error measure.<br />
If the feature is a vertex, vertex contraction is performed. Vertex contraction: If the BoT has mode surf, plate or plate_nocos, we just find the midpoint of the line connecting the vertices and place both the points there. If the mode is volume, we find the midpoint of the line formed by the intersection of the two tangential planes at both the boundaries. This is the vertex that the initial two vertices are moved to. <br />
Else if the feature is an edge, edge contraction is performed. This is the case of T-joints. The boundary vertex is projected on to the said feature pair (the edge). The triangle which contains the edge is split at that vertex. And then vertex contraction of the boundary vertex and the projected vertex is done. This method works for all the BoT modes. <br />
<br />
Note: It will be taken care not to introduce any singular elements at this stage<br />
<br />
'''Pseudo code:'''<br />
<br />
'''ZIPPER_GAPS (PQUEUE):'''<br />
<br />
Vertex V ←POP_MINIMUM (PQUEUE)<br />
Feature F ← NEAREST_FEATURE (V)<br />
if f is a vertex then<br />
VERTEX_CONTRACTION (V, F)<br />
else<br />
VERTEX_EDGE_CONTRACTION (V, F)<br />
EdgeSet E ← MODIFIED_EDGES<br />
for all e ∊ E do<br />
for all v ∊ {CORRESPONDING_FEATURES (e)} do<br />
MAINTAIN_CORRESPONDENCES (v)<br />
REINSERT (v)<br />
end for<br />
end for<br />
<br />
<br />
Where,<br />
'''ZIPPER_GAPS (PQUEUE) '''zippers the pair with the least error distance<br />
<br />
'''POP_MINIMUM (PQUEUE) '''pops the element with minimum error distance from the priority queue PQUEUE. <br />
<br />
'''NEAREST_FEATURE (V) '''gives the nearest feature pair of the vertex V.<br />
<br />
'''VERTEX_CONTRACTION (V, F)''' and VERTEX_EDGE_CONTRACTION (V, F) perform contraction of the the vertex V with its feature pair F.<br />
<br />
'''MODIFIED_EDGES () '''returns the set of all edges that are modified after the contraction routines.<br />
<br />
'''CORRESPONDING_FEATURES (e)''' returns the set of all vertices whose feature pair the edge e (from the modified set) is. <br />
<br />
'''MAINTAIN_CORRESPONDENCES (v)''' updates the feature pair of the vertex v after the modification of the edges.<br />
<br />
'''REINSERT (v)''' reinserts the vertex v into PQUEUE.<br />
<br />
<br />
'''2. Stitching:'''<br />
<br />
We have two input polygonal chains that are within the tolerance (for gap stitching). <br />
We start with one of any chain and merge them as if they were sorted lists. <br />
In each step we have pointers to the current vertex on each of the chains (vertices - u and v) and we advance the pointer on one of the chains according to some advancing rules, say to vertex w. <br />
Now we make a triangle uvw, unoriented (if the rest of the mesh is unoriented) or with orientation that is same as the rest of the mesh (CW or CCW). <br />
When we reach the last vertex on one chain we advance the pointer only on the other chain. We terminate when we have reached the last vertices on both the chains. <br />
<br />
'''The advancing rule: '''Whichever triangle has the least perimeter, the pointer is advanced on the chain whose edge is present in the above-mentioned triangle. Formulating this: <br />
<br />
This advancing rule has been seen to give the best results. <br />
<br />
'''Pseudo code:'''<br />
<br />
'''STITCH_GAPS (MESH_A, MESH_B):'''<br />
//MESH_A and MESH_B denote the boundaries of the two meshes to be stitches (essentially a sequence a vertices)<br />
u ← STARTING_VERTEX (MESH_A)<br />
v ← STARTING_VERTEX (MESH_B)<br />
while both meshes haven’t reached their terminal vertices<br />
u′ ← NEXT_VERTEX (MESH_A, u)<br />
v′ ← NEXT_VERTEX (MESH_B, v)<br />
if PERIMETER ( u, u’, v) < PERIMETER ( u, v, v’ ) then<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
else <br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
while MESH_A has vertices left<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
while MESH_B has vertices left<br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
<br />
Where,<br />
'''STARTING_VERTEX (MESH)''' returns the starting vertex in the sequence of vertices in MESH.<br />
<br />
'''NEXT_VERTEX (MESH, a)''' returns the vertex after a in the sequence.<br />
MESH<br />
<br />
'''PERIMETER ( a, b, c)''' returns the perimeter of the triangle formed by the three vertices a, b, and c.<br />
<br />
'''MAKE_TRIANGLE (a, b, c)''' adds the triangle formed by the three vertices to the list of faces.<br />
<br />
'''ADVANCE_POINTER (MESH, a)''' updates the current vertex pointer from a to the next vertex in MESH.<br />
<br />
===Removal of overlaps: ===<br />
<br />
Clipping one mesh against another and removing small triangles formed if any. Overlaps are detected by checking if there are any vertices/edges close to a boundary vertex within the merge tolerance (and inside the boundary). <br />
<br />
'''Steps involved:'''<br />
<br />
'''1. Removal of redundant surfaces of the mesh: '''<br />
<br />
General idea is to eat away at both the mesh boundaries until the two meshes just meet. We repeat the process of redundancy removal until both the meshes in consideration (say, mesh A and mesh B) are unchanged. Redundancy checking done through the nearest_on_mesh(P, d, M) routine, which returns the nearest point on mesh M to the point P within a distance of d, or nothing if no such point exists. This function will be written. <br />
<br />
'''2. Clipping one mesh against another: '''<br />
<br />
The next step is clipping mesh A against the boundary of mesh B. We introduce new vertices on the boundary of mesh B where edges of the boundary triangles of mesh A intersect it. The set of new vertices added and the existing boundary vertices of mesh B form the final vertices of the mesh boundary between the meshes A and B. The boundary triangles of mesh B are split at the new vertices. Degenerate triangles might be introduced (which will be solved later). The region of the boundary triangles of mesh A inside the boundary of mesh B is discarded (clipped away) and the region outside this boundary is retained. The portion of mesh A that is retained can be triangulated using the stitching routine, that has already been discussed. Any degeneracies introduced will be handled later.<br />
<br />
A bag of triangles of created out of the retained portion in mesh A and it can be combined with the rest of the mesh using the rt_bot_merge function in src/librt/primitives/bot/bot.c<br />
<br />
'''3. Removal of the small triangles introduced during clipping: '''<br />
<br />
This will be done as a part of the degeneracy removal.<br />
<br />
Adapting this algorithm to 3 dimensions is easy. What we do is, we thicken the mesh boundary of mesh B. A wall runs around the mesh boundary which is roughly perpendicular to the mesh at all points. The wall is a collection of four triangles at each edge E. To find the intersection, see where the boundary of mesh A intersects the wall. Project this point onto the edge E. The rest of the algorithm is same as what is mentioned above. <br />
<br />
<br />
<br />
===Triangulation of large holes: ===<br />
<br />
Simple and ring holes (complex). A simple hole is a hole of any shape with only one boundary loop. A ring hole contains at least two peripheral loops. <br />
<br />
Hole-filling algorithms should possess the following properties:<br />
1. Able to cover an arbitrary hole for any model (robustness)<br />
2. Capable of filling large holes in a reasonable amount of time (efficiency)<br />
3. Enable the patched surface to match the missing geometry well (precision)<br />
<br />
'''Procedure for simple holes: '''<br />
<br />
'''1. Detecting the hole boundary: '''<br />
<br />
To check if a vertex is a boundary vertex, we check the number of 1-ring vertices and 1-ring edges. If the two numbers are not equal, then it is a boundary vertex. When we get a seed boundary vertex, we trace along the path of the boundary edges. If we get a loop, we’ve identified a hole. In this manner, all holes can be identified. <br />
<br />
'''2. Using the Advancing front algorithm to create the mesh: '''<br />
<br />
The situations are divided into three cases, based on the minimum angle (say, ɑ) between two adjacent edges of a free element (in a closed loop):<br />
<br />
(i) ɑ ≤ 75° - Make a triangle out of the two edges of the free elements.<br />
<br />
(ii) 75° < ɑ ≤ 135° - Make two equilateral triangles out of the two free elements’ edges. The two normal vectors are obtained by averaging the common vertex and the vertex at the other end of the edge in the said triangle. These normals are obtained by averaging the 1-ring vertices of each vertex. The two new nodes that are formed are averaged and merged. Whenever any new node is added, it is checked whether this node is within the tolerance of any other existing node, and if it is, it is merged with that node. If not, no action is performed. <br />
<br />
(iii) ɑ > 135° - Make two equilateral triangles corresponding to the two free elements’ edges. <br />
<br />
<br />
<br />
<br />
'''Complex/Ring holes:''' <br />
<br />
Two approaches can be taken.<br />
<br />
(i) Disregard the island patch and treat it as a simple hole, but this approach reduces fidelity. <br />
<br />
(ii) Keep the island patch and mesh only the missing parts. <br />
<br />
(a) This could be done by identifying corresponding elements on the inner and the outer loop and finding the shortest bridge between the two but it is a specific case. <br />
<br />
(b) Another approach could be to use the AFM technique to mesh until the triangles being added just overlap with the existing island meshes. Then we use the technique which was mentioned for overlaps, where we clip the newly added mesh with the existing mesh. <br />
<br />
Which method to employ will be decided based on the number of island meshes and the presence of corresponding vertices on the inner and outer loop, after discussions with the mentor. <br />
<br />
<br />
===Removal of degenerate faces (will be completed if time permits):===<br />
<br />
User input: Face factor and tolerance edge length.<br />
<br />
A triangle is labelled degenerate if it has an angle either too acute (≤ ∊)- needle, or too obtuse( ≥ π - ∊) - cap.<br />
Cap and Needle: <br />
<br />
<br />
Done by element reconstruction algorithm - nodal merging and edge swapping (to improve the overall quality of the mesh). <br />
Edge swapping done by changing the connectivity of the common edge between the two connecting triangles. Any element with edge lengths lesser than that will face removal or reconstruction. If the face factor of the element is less than the user input, it will undergo removal by nodal merging. If not, it undergoes edge swapping. <br />
<br />
E is the equilateral factor a triangle. A triangle with E = 0 is an equilateral triangle. The maximum value of E is ⅔ ², which is also the most undesirable value. Thus, we put that value as the constant while calculating the shape factor, f.<br />
<br />
===Manifold connectivity (will be completed if time permits): ===<br />
<br />
<br />
'''Criteria for manifold surfaces:'''<br />
<br />
a. Every edge is shared by exactly two faces (absence of singular edges)<br />
<br />
b. Every vertex is surrounded by a single cycle of faces and edges (absence of singular vertices): These could be formed by duplicate vertices reduction (to reduce the amount of space used). So it will be taken care that, vertices condensation will take place before this step.<br />
<br />
(i) Singular edges have constituent singular vertices. They are first removed through cutting. <br />
<br />
(ii) Each vertex has a list of faces that reference it. Around a vertex, when one cycle of connected components are found, if the number of faces in that cycle is not equal to the total number of faces that contain the vertex (valency), then it is singular. <br />
<br />
(iii) By going through the face list of singular vertices, the number of connected components can be found. If there are n connected components, make n - 1 copies of the vertex and assign each of the connected components discrete labels of the vertex. This makes the mesh devoid of singular vertices. <br />
<br />
(iv) At this step we have removed all singular vertices and edges, but we would like to stitch together some of the erstwhile singular edges to preserve the geometry.<br />
<br />
(v) Stitching of edges can take place only when the configuration after stitching does not produce any singular elements. <br />
<br />
(vi) Stitching of two edges can take place when the faces containing the edge have the same normal. This condition is subject to change. <br />
<br />
c. Shells must have consistent orientations <br />
<br />
There is support for this in the existing code. We check if each face if oriented according what is mentioned in the rt_bot_internal structure (if it is oriented, that is), and if not we flip the orientation. <br />
<br />
==Links to the algorithms I intend to use:==<br />
<br />
1. AVL Tree method for vertex merging - Generating Topological Information from a "Bucket of Facets" - Rock and Wozny, 1992.<br />
<br />
2. Zippering algorithm for gap and T - joint closing - Progressive Gap Closing for Mesh Repairing, Borodin et. al, 2002, Stitching and Filling: Creating Conformal Faceted Geometry, Patel et. al, <br />
<br />
3. Stitching algorithm for gap and T - joint closing - Filling gaps in the boundary of a Polyhedron, Barequet and Sharir.<br />
<br />
4. Removal of overlaps - Zippered polygon meshes from range images, Turk and Levoy.<br />
<br />
5. Triangulation of holes - A robust hole-filling algorithm for triangular mesh, Zhao et. al.<br />
<br />
6. Removal of degeneracies - Automatic mesh-healing technique for model repair and finite element model generation, Chong, Senthil Kumar, Lee.<br />
<br />
==Deliverables:==<br />
Patch containing functions for removal of gaps and T-joints.<br />
Patch containing functions for removal of overlaps.<br />
Patch containing functions for triangulation and correcting of holes.<br />
Patch containing functions to identify all the defects and set the right callbacks<br />
<br />
==Development Schedule:==<br />
<br />
'''Community Bonding Period:''' The exact layout of where in the codebase to include all the functionalities will be discussed with the mentor and decided. Certain situation have ambiguities as to which approach to take; this will also be clarified. Other than that, suggestions for improvements on proposed methods will also be taken from the mentors. <br />
<br />
*'''Week 1 (May 23rd to May 29th):''' Changes in the existing code (vertex merging using AVL trees and setting face adjacencies in the bot_edge structure)<br />
<br />
*'''Week 2 (May 30th to June 5th):''' Testing changes made in the existing code<br />
<br />
*'''Week 3 (June 6th to June 12th):''' Gaps and T-joints - Zippering<br />
<br />
*'''Week 4 (June 13th to June 19th):''' Gaps and T-joints - Stitching<br />
<br />
*'''Week 5 (June 20th to June 26th):''' Gaps and T-joints - Testing<br />
<br />
*'''Week 6 (June 27th to July 3rd):''' Overlaps fixing<br />
<br />
*'''Week 7 (July 4th to July 10th):''' Overlaps - testing<br />
<br />
*'''Week 8 (July 11th to July 17th):''' Hole - filling using AFM<br />
<br />
*'''Week 9 (July 18th to July 24th):''' Hole - filling testing<br />
<br />
*'''Week 10, 11 (July 25th to August 7th):''' Detection of all errors in meshes and setting the appropriate callbacks to existing features and added features.<br />
<br />
*'''Week 12, 13 (August 8th to August 23rd):''' Buffer period. Code cleanup and final testing of all functionalities. Documentation. <br />
<br />
'''If time permits:'''<br />
<br />
Manifold connectivity checking of the meshes.<br />
Degeneracy removal<br />
Make a command ‘heal’ with parameters - small gap tolerance, large gap tolerance, minimum edge length allowed, face factor. And provision could also be made to skip any particular step in the mesh healing process. <br />
<br />
These parts are less essential to mesh healing than fixing gaps, holes, etc. are. Thus, if I end up going ahead of the schedule, these tasks will be done. If not, they will be done after the GSoC coding period ends.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Project&diff=9680User:Tandoorichick/GSoC2016/Project2016-05-07T19:34:54Z<p>Tandoorichick: </p>
<hr />
<div>=Automatic Polygonal Mesh Healing=<br />
<br />
==Existing features==<br />
<br />
Removal of isolated and duplicate vertices in rt_bot_condense() and rt_bot_vertex_fuse() functions in src/librt/primitives/bot/bot.c<br />
Removal of dangling edges and and decimation of edges by removing the faces that contain that edge, the edges that those faces contain and changing references of one vertex of the edge to the other all functions in decimate.c in src/librt/primitives/bot<br />
Fusing of equivalent faces in rt_bot_face_fuse in src/librt/primitives/bot/bot.c<br />
<br />
==Changes that could be incorporated in the existing code==<br />
The current code uses bin sorting to check for duplicate vertices. While it is true that it works in O(n) time on an average, the worst case complexity is O(n²). This might happen when all the vertices have the same x-coordinate. To optimise this, an AVL tree can be used to store the vertices and check if any vertex that is yet to be checked is equivalent to (is within the merge tolerance of) any existing point. This method works in O( n*logn) on an average.<br />
<br />
In the existing bot_edge structure, the faces containing it can be added as well. This functionality will be used when we check for singular vertices and while removing redundant elements while checking for overlaps in the mesh. Without this topological information of face adjacencies, if we need to check for adjacent faces, O(n) time will be required. But with it being set, it will be reduced to O(1). <br />
<br />
==Detailed Description of the Project:==<br />
'''Features to be added (inclusive of tasks to be done if time permits):'''<br />
<br />
===Removal of gaps and T-joints===<br />
Two approaches will be used - Zippering and Stitching. Both methods will be implemented and which method to use will be decided based on a tolerance for small and large gaps (user inputs). Stitching is used when the gaps are slightly larger - when they are small enough to be gaps but not large enough to be holes.<br />
<br />
It is easy to detect boundaries of polygonal chains; they can done through the presence of free edges (there is support for this in the existing bot_edge structure). When there is any vertex/edge close to it within the merge tolerance (and not inside it) - zippering or stitching can be performed based on the tolerance. <br />
<br />
'''Subdivisions:'''<br />
<br />
'''1. Zippering:'''<br />
<br />
We identify the the boundary chains of the mesh. <br />
For all the boundary vertices, we find the nearest boundary edge that is non-incident to the vertex. <br />
If an orthogonal projection of the said vertex on the found edge is possible, the edge is stored as the paired feature. Else, the nearest vertex of the edge is stored. <br />
For each of the feature pairs, the distance between them is computed and stored as an error measure. <br />
Then, all the feature pairs are sorted according to that error measure and stored in a priority queue.<br />
We pop the the feature pair with the least error measure.<br />
If the feature is a vertex, vertex contraction is performed. Vertex contraction: If the BoT has mode surf, plate or plate_nocos, we just find the midpoint of the line connecting the vertices and place both the points there. If the mode is volume, we find the midpoint of the line formed by the intersection of the two tangential planes at both the boundaries. This is the vertex that the initial two vertices are moved to. <br />
Else if the feature is an edge, edge contraction is performed. This is the case of T-joints. The boundary vertex is projected on to the said feature pair (the edge). The triangle which contains the edge is split at that vertex. And then vertex contraction of the boundary vertex and the projected vertex is done. This method works for all the BoT modes. <br />
<br />
Note: It will be taken care not to introduce any singular elements at this stage<br />
<br />
'''Pseudo code:'''<br />
<br />
'''ZIPPER_GAPS (PQUEUE):'''<br />
<br />
Vertex V ←POP_MINIMUM (PQUEUE)<br />
Feature F ← NEAREST_FEATURE (V)<br />
if f is a vertex then<br />
VERTEX_CONTRACTION (V, F)<br />
else<br />
VERTEX_EDGE_CONTRACTION (V, F)<br />
EdgeSet E ← MODIFIED_EDGES<br />
for all e ∊ E do<br />
for all v ∊ {CORRESPONDING_FEATURES (e)} do<br />
MAINTAIN_CORRESPONDENCES (v)<br />
REINSERT (v)<br />
end for<br />
end for<br />
<br />
<br />
Where,<br />
ZIPPER_GAPS (PQUEUE) zippers the pair with the least error distance<br />
POP_MINIMUM (PQUEUE) pops the element with minimum error distance from the priority queue PQUEUE. <br />
NEAREST_FEATURE (V) gives the nearest feature pair of the vertex V.<br />
VERTEX_CONTRACTION (V, F) and VERTEX_EDGE_CONTRACTION (V, F) perform contraction of the the vertex V with its feature pair F.<br />
MODIFIED_EDGES () returns the set of all edges that are modified after the contraction routines.<br />
CORRESPONDING_FEATURES (e) returns the set of all vertices whose feature pair the edge e (from the modified set) is. <br />
MAINTAIN_CORRESPONDENCES (v) updates the feature pair of the vertex v after the modification of the edges.<br />
REINSERT (v) reinserts the vertex v into PQUEUE.<br />
<br />
<br />
'''2. Stitching:'''<br />
<br />
We have two input polygonal chains that are within the tolerance (for gap stitching). <br />
We start with one of any chain and merge them as if they were sorted lists. <br />
In each step we have pointers to the current vertex on each of the chains (vertices - u and v) and we advance the pointer on one of the chains according to some advancing rules, say to vertex w. <br />
Now we make a triangle uvw, unoriented (if the rest of the mesh is unoriented) or with orientation that is same as the rest of the mesh (CW or CCW). <br />
When we reach the last vertex on one chain we advance the pointer only on the other chain. We terminate when we have reached the last vertices on both the chains. <br />
<br />
'''The advancing rule: '''Whichever triangle has the least perimeter, the pointer is advanced on the chain whose edge is present in the above-mentioned triangle. Formulating this: <br />
<br />
This advancing rule has been seen to give the best results. <br />
<br />
'''Pseudo code:'''<br />
<br />
'''STITCH_GAPS (MESH_A, MESH_B):'''<br />
//MESH_A and MESH_B denote the boundaries of the two meshes to be stitches (essentially a sequence a vertices)<br />
<br />
u ← STARTING_VERTEX (MESH_A)<br />
v ← STARTING_VERTEX (MESH_B)<br />
while both meshes haven’t reached their terminal vertices<br />
u′ ← NEXT_VERTEX (MESH_A, u)<br />
v′ ← NEXT_VERTEX (MESH_B, v)<br />
if PERIMETER ( u, u’, v) < PERIMETER ( u, v, v’ ) then<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
else <br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
while MESH_A has vertices left<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
while MESH_B has vertices left<br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
<br />
Where,<br />
STARTING_VERTEX (MESH) returns the starting vertex in the sequence of vertices in MESH.<br />
NEXT_VERTEX (MESH, a) returns the vertex after a in the sequence MESH<br />
PERIMETER ( a, b, c) returns the perimeter of the triangle formed by the three vertices a, b, and c.<br />
MAKE_TRIANGLE (a, b, c) adds the triangle formed by the three vertices to the list of faces.<br />
ADVANCE_POINTER (MESH, a) updates the current vertex pointer from a to the next vertex in MESH.<br />
<br />
===Removal of overlaps: ===<br />
<br />
Clipping one mesh against another and removing small triangles formed if any. Overlaps are detected by checking if there are any vertices/edges close to a boundary vertex within the merge tolerance (and inside the boundary). <br />
<br />
'''Steps involved:'''<br />
<br />
'''1. Removal of redundant surfaces of the mesh: '''<br />
<br />
General idea is to eat away at both the mesh boundaries until the two meshes just meet. We repeat the process of redundancy removal until both the meshes in consideration (say, mesh A and mesh B) are unchanged. Redundancy checking done through the nearest_on_mesh(P, d, M) routine, which returns the nearest point on mesh M to the point P within a distance of d, or nothing if no such point exists. This function will be written. <br />
<br />
'''2. Clipping one mesh against another: '''<br />
<br />
The next step is clipping mesh A against the boundary of mesh B. We introduce new vertices on the boundary of mesh B where edges of the boundary triangles of mesh A intersect it. The set of new vertices added and the existing boundary vertices of mesh B form the final vertices of the mesh boundary between the meshes A and B. The boundary triangles of mesh B are split at the new vertices. Degenerate triangles might be introduced (which will be solved later). The region of the boundary triangles of mesh A inside the boundary of mesh B is discarded (clipped away) and the region outside this boundary is retained. The portion of mesh A that is retained can be triangulated using the stitching routine, that has already been discussed. Any degeneracies introduced will be handled later.<br />
<br />
A bag of triangles of created out of the retained portion in mesh A and it can be combined with the rest of the mesh using the rt_bot_merge function in src/librt/primitives/bot/bot.c<br />
<br />
'''3. Removal of the small triangles introduced during clipping: '''<br />
<br />
This will be done as a part of the degeneracy removal.<br />
<br />
Adapting this algorithm to 3 dimensions is easy. What we do is, we thicken the mesh boundary of mesh B. A wall runs around the mesh boundary which is roughly perpendicular to the mesh at all points. The wall is a collection of four triangles at each edge E. To find the intersection, see where the boundary of mesh A intersects the wall. Project this point onto the edge E. The rest of the algorithm is same as what is mentioned above. <br />
<br />
<br />
<br />
===Triangulation of large holes: ===<br />
<br />
Simple and ring holes (complex). A simple hole is a hole of any shape with only one boundary loop. A ring hole contains at least two peripheral loops. <br />
<br />
Hole-filling algorithms should possess the following properties:<br />
1. Able to cover an arbitrary hole for any model (robustness)<br />
2. Capable of filling large holes in a reasonable amount of time (efficiency)<br />
3. Enable the patched surface to match the missing geometry well (precision)<br />
<br />
'''Procedure for simple holes: '''<br />
<br />
'''1. Detecting the hole boundary: '''<br />
<br />
To check if a vertex is a boundary vertex, we check the number of 1-ring vertices and 1-ring edges. If the two numbers are not equal, then it is a boundary vertex. When we get a seed boundary vertex, we trace along the path of the boundary edges. If we get a loop, we’ve identified a hole. In this manner, all holes can be identified. <br />
<br />
'''2. Using the Advancing front algorithm to create the mesh: '''<br />
<br />
The situations are divided into three cases, based on the minimum angle (say, ɑ) between two adjacent edges of a free element (in a closed loop):<br />
<br />
(i) ɑ ≤ 75° - Make a triangle out of the two edges of the free elements.<br />
<br />
(ii) 75° < ɑ ≤ 135° - Make two equilateral triangles out of the two free elements’ edges. The two normal vectors are obtained by averaging the common vertex and the vertex at the other end of the edge in the said triangle. These normals are obtained by averaging the 1-ring vertices of each vertex. The two new nodes that are formed are averaged and merged. Whenever any new node is added, it is checked whether this node is within the tolerance of any other existing node, and if it is, it is merged with that node. If not, no action is performed. <br />
<br />
(iii) ɑ > 135° - Make two equilateral triangles corresponding to the two free elements’ edges. <br />
<br />
<br />
<br />
<br />
'''Complex/Ring holes:''' <br />
<br />
Two approaches can be taken.<br />
<br />
(i) Disregard the island patch and treat it as a simple hole, but this approach reduces fidelity. <br />
<br />
(ii) Keep the island patch and mesh only the missing parts. <br />
<br />
(a) This could be done by identifying corresponding elements on the inner and the outer loop and finding the shortest bridge between the two but it is a specific case. <br />
<br />
(b) Another approach could be to use the AFM technique to mesh until the triangles being added just overlap with the existing island meshes. Then we use the technique which was mentioned for overlaps, where we clip the newly added mesh with the existing mesh. <br />
<br />
Which method to employ will be decided based on the number of island meshes and the presence of corresponding vertices on the inner and outer loop, after discussions with the mentor. <br />
<br />
<br />
===Removal of degenerate faces (will be completed if time permits):===<br />
<br />
User input: Face factor and tolerance edge length.<br />
<br />
A triangle is labelled degenerate if it has an angle either too acute (≤ ∊)- needle, or too obtuse( ≥ π - ∊) - cap.<br />
Cap and Needle: <br />
<br />
<br />
Done by element reconstruction algorithm - nodal merging and edge swapping (to improve the overall quality of the mesh). <br />
Edge swapping done by changing the connectivity of the common edge between the two connecting triangles. Any element with edge lengths lesser than that will face removal or reconstruction. If the face factor of the element is less than the user input, it will undergo removal by nodal merging. If not, it undergoes edge swapping. <br />
<br />
E is the equilateral factor a triangle. A triangle with E = 0 is an equilateral triangle. The maximum value of E is ⅔ ², which is also the most undesirable value. Thus, we put that value as the constant while calculating the shape factor, f.<br />
<br />
===Manifold connectivity (will be completed if time permits): ===<br />
<br />
<br />
'''Criteria for manifold surfaces:'''<br />
<br />
a. Every edge is shared by exactly two faces (absence of singular edges)<br />
<br />
b. Every vertex is surrounded by a single cycle of faces and edges (absence of singular vertices): These could be formed by duplicate vertices reduction (to reduce the amount of space used). So it will be taken care that, vertices condensation will take place before this step.<br />
<br />
(i) Singular edges have constituent singular vertices. They are first removed through cutting. <br />
<br />
(ii) Each vertex has a list of faces that reference it. Around a vertex, when one cycle of connected components are found, if the number of faces in that cycle is not equal to the total number of faces that contain the vertex (valency), then it is singular. <br />
<br />
(iii) By going through the face list of singular vertices, the number of connected components can be found. If there are n connected components, make n - 1 copies of the vertex and assign each of the connected components discrete labels of the vertex. This makes the mesh devoid of singular vertices. <br />
<br />
(iv) At this step we have removed all singular vertices and edges, but we would like to stitch together some of the erstwhile singular edges to preserve the geometry.<br />
<br />
(v) Stitching of edges can take place only when the configuration after stitching does not produce any singular elements. <br />
<br />
(vi) Stitching of two edges can take place when the faces containing the edge have the same normal. This condition is subject to change. <br />
<br />
c. Shells must have consistent orientations <br />
<br />
There is support for this in the existing code. We check if each face if oriented according what is mentioned in the rt_bot_internal structure (if it is oriented, that is), and if not we flip the orientation. <br />
<br />
==Links to the algorithms I intend to use:==<br />
<br />
1. AVL Tree method for vertex merging - Generating Topological Information from a "Bucket of Facets" - Rock and Wozny, 1992.<br />
<br />
2. Zippering algorithm for gap and T - joint closing - Progressive Gap Closing for Mesh Repairing, Borodin et. al, 2002, Stitching and Filling: Creating Conformal Faceted Geometry, Patel et. al, <br />
<br />
3. Stitching algorithm for gap and T - joint closing - Filling gaps in the boundary of a Polyhedron, Barequet and Sharir.<br />
<br />
4. Removal of overlaps - Zippered polygon meshes from range images, Turk and Levoy.<br />
<br />
5. Triangulation of holes - A robust hole-filling algorithm for triangular mesh, Zhao et. al.<br />
<br />
6. Removal of degeneracies - Automatic mesh-healing technique for model repair and finite element model generation, Chong, Senthil Kumar, Lee.<br />
<br />
==Deliverables:==<br />
Patch containing functions for removal of gaps and T-joints.<br />
Patch containing functions for removal of overlaps.<br />
Patch containing functions for triangulation and correcting of holes.<br />
Patch containing functions to identify all the defects and set the right callbacks<br />
<br />
==Development Schedule:==<br />
<br />
'''Community Bonding Period:''' The exact layout of where in the codebase to include all the functionalities will be discussed with the mentor and decided. Certain situation have ambiguities as to which approach to take; this will also be clarified. Other than that, suggestions for improvements on proposed methods will also be taken from the mentors. <br />
<br />
*'''Week 1 (May 23rd to May 29th):''' Changes in the existing code (vertex merging using AVL trees and setting face adjacencies in the bot_edge structure)<br />
<br />
*'''Week 2 (May 30th to June 5th):''' Testing changes made in the existing code<br />
<br />
*'''Week 3 (June 6th to June 12th):''' Gaps and T-joints - Zippering<br />
<br />
*'''Week 4 (June 13th to June 19th):''' Gaps and T-joints - Stitching<br />
<br />
*'''Week 5 (June 20th to June 26th):''' Gaps and T-joints - Testing<br />
<br />
*'''Week 6 (June 27th to July 3rd):''' Overlaps fixing<br />
<br />
*'''Week 7 (July 4th to July 10th):''' Overlaps - testing<br />
<br />
*'''Week 8 (July 11th to July 17th):''' Hole - filling using AFM<br />
<br />
*'''Week 9 (July 18th to July 24th):''' Hole - filling testing<br />
<br />
*'''Week 10, 11 (July 25th to August 7th):''' Detection of all errors in meshes and setting the appropriate callbacks to existing features and added features.<br />
<br />
*'''Week 12, 13 (August 8th to August 23rd):''' Buffer period. Code cleanup and final testing of all functionalities. Documentation. <br />
<br />
'''If time permits:'''<br />
<br />
Manifold connectivity checking of the meshes.<br />
Degeneracy removal<br />
Make a command ‘heal’ with parameters - small gap tolerance, large gap tolerance, minimum edge length allowed, face factor. And provision could also be made to skip any particular step in the mesh healing process. <br />
<br />
These parts are less essential to mesh healing than fixing gaps, holes, etc. are. Thus, if I end up going ahead of the schedule, these tasks will be done. If not, they will be done after the GSoC coding period ends.</div>Tandoorichickhttps://brlcad.org/w/index.php?title=User:Tandoorichick/GSoC2016/Project&diff=9679User:Tandoorichick/GSoC2016/Project2016-05-07T18:54:00Z<p>Tandoorichick: Created page with "=Automatic Polygonal Mesh Healing= ==Existing features:== Removal of isolated and duplicate vertices in rt_bot_condense() and rt_bot_vertex_fuse() functions in src/librt/pr..."</p>
<hr />
<div>=Automatic Polygonal Mesh Healing=<br />
<br />
==Existing features:==<br />
<br />
Removal of isolated and duplicate vertices in rt_bot_condense() and rt_bot_vertex_fuse() functions in src/librt/primitives/bot/bot.c<br />
Removal of dangling edges and and decimation of edges by removing the faces that contain that edge, the edges that those faces contain and changing references of one vertex of the edge to the other all functions in decimate.c in src/librt/primitives/bot<br />
Fusing of equivalent faces in rt_bot_face_fuse in src/librt/primitives/bot/bot.c<br />
<br />
==Changes that could be incorporated in the existing code:==<br />
The current code uses bin sorting to check for duplicate vertices. While it is true that it works in O(n) time on an average, the worst case complexity is O(n²). This might happen when all the vertices have the same x-coordinate. To optimise this, an AVL tree can be used to store the vertices and check if any vertex that is yet to be checked is equivalent to (is within the merge tolerance of) any existing point. This method works in O( n*logn) on an average.<br />
<br />
In the existing bot_edge structure, the faces containing it can be added as well. This functionality will be used when we check for singular vertices and while removing redundant elements while checking for overlaps in the mesh. Without this topological information of face adjacencies, if we need to check for adjacent faces, O(n) time will be required. But with it being set, it will be reduced to O(1). <br />
<br />
==Detailed Description of the Project:==<br />
'''Features to be added (inclusive of tasks to be done if time permits):'''<br />
<br />
===Removal of gaps and T-joints: ===<br />
Two approaches will be used - Zippering and Stitching. Both methods will be implemented and which method to use will be decided based on a tolerance for small and large gaps (user inputs). Stitching is used when the gaps are slightly larger - when they are small enough to be gaps but not large enough to be holes.<br />
<br />
It is easy to detect boundaries of polygonal chains; they can done through the presence of free edges (there is support for this in the existing bot_edge structure). When there is any vertex/edge close to it within the merge tolerance (and not inside it) - zippering or stitching can be performed based on the tolerance. <br />
<br />
Subdivisions:<br />
<br />
Zippering: <br />
We identify the the boundary chains of the mesh. <br />
For all the boundary vertices, we find the nearest boundary edge that is non-incident to the vertex. <br />
If an orthogonal projection of the said vertex on the found edge is possible, the edge is stored as the paired feature. Else, the nearest vertex of the edge is stored. <br />
For each of the feature pairs, the distance between them is computed and stored as an error measure. <br />
Then, all the feature pairs are sorted according to that error measure and stored in a priority queue.<br />
We pop the the feature pair with the least error measure.<br />
If the feature is a vertex, vertex contraction is performed. Vertex contraction: If the BoT has mode surf, plate or plate_nocos, we just find the midpoint of the line connecting the vertices and place both the points there. If the mode is volume, we find the midpoint of the line formed by the intersection of the two tangential planes at both the boundaries. This is the vertex that the initial two vertices are moved to. <br />
Else if the feature is an edge, edge contraction is performed. This is the case of T-joints. The boundary vertex is projected on to the said feature pair (the edge). The triangle which contains the edge is split at that vertex. And then vertex contraction of the boundary vertex and the projected vertex is done. This method works for all the BoT modes. <br />
<br />
Note: It will be taken care not to introduce any singular elements at this stage<br />
<br />
Pseudo code:<br />
<br />
ZIPPER_GAPS (PQUEUE):<br />
<br />
Vertex V ←POP_MINIMUM (PQUEUE)<br />
Feature F ← NEAREST_FEATURE (V)<br />
if f is a vertex then<br />
VERTEX_CONTRACTION (V, F)<br />
else<br />
VERTEX_EDGE_CONTRACTION (V, F)<br />
EdgeSet E ← MODIFIED_EDGES<br />
for all e ∊ E do<br />
for all v ∊ {CORRESPONDING_FEATURES (e)} do<br />
MAINTAIN_CORRESPONDENCES (v)<br />
REINSERT (v)<br />
end for<br />
end for<br />
<br />
<br />
Where,<br />
ZIPPER_GAPS (PQUEUE) zippers the pair with the least error distance<br />
POP_MINIMUM (PQUEUE) pops the element with minimum error distance from the priority queue PQUEUE. <br />
NEAREST_FEATURE (V) gives the nearest feature pair of the vertex V.<br />
VERTEX_CONTRACTION (V, F) and VERTEX_EDGE_CONTRACTION (V, F) perform contraction of the the vertex V with its feature pair F.<br />
MODIFIED_EDGES () returns the set of all edges that are modified after the contraction routines.<br />
CORRESPONDING_FEATURES (e) returns the set of all vertices whose feature pair the edge e (from the modified set) is. <br />
MAINTAIN_CORRESPONDENCES (v) updates the feature pair of the vertex v after the modification of the edges.<br />
REINSERT (v) reinserts the vertex v into PQUEUE.<br />
<br />
<br />
Stitching: We have two input polygonal chains that are within the tolerance (for gap stitching). <br />
We start with one of any chain and merge them as if they were sorted lists. <br />
In each step we have pointers to the current vertex on each of the chains (vertices - u and v) and we advance the pointer on one of the chains according to some advancing rules, say to vertex w. <br />
Now we make a triangle uvw, unoriented (if the rest of the mesh is unoriented) or with orientation that is same as the rest of the mesh (CW or CCW). <br />
When we reach the last vertex on one chain we advance the pointer only on the other chain. We terminate when we have reached the last vertices on both the chains. <br />
<br />
The advancing rule: Whichever triangle has the least perimeter, the pointer is advanced on the chain whose edge is present in the above-mentioned triangle. Formulating this: <br />
<br />
This advancing rule has been seen to give the best results. <br />
<br />
Pseudo code:<br />
<br />
STITCH_GAPS (MESH_A, MESH_B):<br />
//MESH_A and MESH_B denote the boundaries of the two meshes to be stitches (essentially a sequence a vertices)<br />
<br />
u ← STARTING_VERTEX (MESH_A)<br />
v ← STARTING_VERTEX (MESH_B)<br />
while both meshes haven’t reached their terminal vertices<br />
u′ ← NEXT_VERTEX (MESH_A, u)<br />
v′ ← NEXT_VERTEX (MESH_B, v)<br />
if PERIMETER ( u, u’, v) < PERIMETER ( u, v, v’ ) then<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
else <br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
while MESH_A has vertices left<br />
MAKE_TRIANGLE ( u, u’, v)<br />
ADVANCE_POINTER ( MESH_A, u)<br />
while MESH_B has vertices left<br />
MAKE_TRIANGLE ( u, v, v’ )<br />
ADVANCE_POINTER ( MESH_B, v)<br />
<br />
Where,<br />
STARTING_VERTEX (MESH) returns the starting vertex in the sequence of vertices in MESH.<br />
NEXT_VERTEX (MESH, a) returns the vertex after a in the sequence MESH<br />
PERIMETER ( a, b, c) returns the perimeter of the triangle formed by the three vertices a, b, and c.<br />
MAKE_TRIANGLE (a, b, c) adds the triangle formed by the three vertices to the list of faces.<br />
ADVANCE_POINTER (MESH, a) updates the current vertex pointer from a to the next vertex in MESH.<br />
<br />
===Removal of overlaps: ===<br />
<br />
Clipping one mesh against another and removing small triangles formed if any. Overlaps are detected by checking if there are any vertices/edges close to a boundary vertex within the merge tolerance (and inside the boundary). <br />
<br />
<br />
<br />
Steps involved:<br />
<br />
Removal of redundant surfaces of the mesh: <br />
<br />
General idea is to eat away at both the mesh boundaries until the two meshes just meet. We repeat the process of redundancy removal until both the meshes in consideration (say, mesh A and mesh B) are unchanged. Redundancy checking done through the nearest_on_mesh(P, d, M) routine, which returns the nearest point on mesh M to the point P within a distance of d, or nothing if no such point exists. This function will be written. <br />
<br />
Clipping one mesh against another: <br />
<br />
The next step is clipping mesh A against the boundary of mesh B. We introduce new vertices on the boundary of mesh B where edges of the boundary triangles of mesh A intersect it. The set of new vertices added and the existing boundary vertices of mesh B form the final vertices of the mesh boundary between the meshes A and B. The boundary triangles of mesh B are split at the new vertices. Degenerate triangles might be introduced (which will be solved later). The region of the boundary triangles of mesh A inside the boundary of mesh B is discarded (clipped away) and the region outside this boundary is retained. The portion of mesh A that is retained can be triangulated using the stitching routine, that has already been discussed. Any degeneracies introduced will be handled later.<br />
<br />
A bag of triangles of created out of the retained portion in mesh A and it can be combined with the rest of the mesh using the rt_bot_merge function in src/librt/primitives/bot/bot.c<br />
<br />
Removal of the small triangles introduced during clipping: <br />
<br />
This will be done as a part of the degeneracy removal.<br />
<br />
Adapting this algorithm to 3 dimensions is easy. What we do is, we thicken the mesh boundary of mesh B. A wall runs around the mesh boundary which is roughly perpendicular to the mesh at all points. The wall is a collection of four triangles at each edge E. To find the intersection, see where the boundary of mesh A intersects the wall. Project this point onto the edge E. The rest of the algorithm is same as what is mentioned above. <br />
<br />
<br />
<br />
===Triangulation of large holes: ===<br />
<br />
Simple and ring holes (complex). A simple hole is a hole of any shape with only one boundary loop. A ring hole contains at least two peripheral loops. <br />
<br />
Hole-filling algorithms should possess the following properties:<br />
Able to cover an arbitrary hole for any model (robustness)<br />
Capable of filling large holes in a reasonable amount of time (efficiency)<br />
Enable the patched surface to match the missing geometry well (precision)<br />
Procedure for simple holes: <br />
<br />
Detecting the hole boundary: <br />
<br />
To check if a vertex is a boundary vertex, we check the number of 1-ring vertices and 1-ring edges. If the two numbers are not equal, then it is a boundary vertex. When we get a seed boundary vertex, we trace along the path of the boundary edges. If we get a loop, we’ve identified a hole. In this manner, all holes can be identified. <br />
<br />
Using the Advancing front algorithm to create the mesh: <br />
<br />
The situations are divided into three cases, based on the minimum angle (say, ɑ) between two adjacent edges of a free element (in a closed loop):<br />
<br />
ɑ ≤ 75° - Make a triangle out of the two edges of the free elements.<br />
<br />
75° < ɑ ≤ 135° - Make two equilateral triangles out of the two free elements’ edges. The two normal vectors are obtained by averaging the common vertex and the vertex at the other end of the edge in the said triangle. These normals are obtained by averaging the 1-ring vertices of each vertex. The two new nodes that are formed are averaged and merged. Whenever any new node is added, it is checked whether this node is within the tolerance of any other existing node, and if it is, it is merged with that node. If not, no action is performed. <br />
<br />
ɑ > 135° - Make two equilateral triangles corresponding to the two free elements’ edges. <br />
<br />
<br />
<br />
<br />
Compex/Ring holes: Two approaches can be taken.<br />
<br />
(i) Disregard the island patch and treat it as a simple hole, but this approach reduces fidelity. <br />
(ii) Keep the island patch and mesh only the missing parts. <br />
This could be done by identifying corresponding elements on the inner and the outer loop and finding the shortest bridge between the two but it is a specific case. <br />
Another approach could be to use the AFM technique to mesh until the triangles being added just overlap with the existing island meshes. Then we use the technique which was mentioned for overlaps, where we clip the newly added mesh with the existing mesh. <br />
<br />
Which method to employ will be decided based on the number of island meshes and the presence of corresponding vertices on the inner and outer loop, after discussions with the mentor. <br />
<br />
<br />
===Removal of degenerate faces (will be completed if time permits):===<br />
<br />
User input: Face factor and tolerance edge length.<br />
<br />
A triangle is labelled degenerate if it has an angle either too acute (≤ ∊)- needle, or too obtuse( ≥ π - ∊) - cap.<br />
Cap and Needle: <br />
<br />
<br />
Done by element reconstruction algorithm - nodal merging and edge swapping (to improve the overall quality of the mesh). <br />
Edge swapping done by changing the connectivity of the common edge between the two connecting triangles. Any element with edge lengths lesser than that will face removal or reconstruction. If the face factor of the element is less than the user input, it will undergo removal by nodal merging. If not, it undergoes edge swapping. <br />
<br />
E is the equilateral factor a triangle. A triangle with E = 0 is an equilateral triangle. The maximum value of E is ⅔ ², which is also the most undesirable value. Thus, we put that value as the constant while calculating the shape factor, f.<br />
<br />
===Manifold connectivity (will be completed if time permits): ===<br />
<br />
<br />
Criteria for manifold surfaces:<br />
<br />
Every edge is shared by exactly two faces (absence of singular edges)<br />
<br />
Every vertex is surrounded by a single cycle of faces and edges (absence of singular vertices): These could be formed by duplicate vertices reduction (to reduce the amount of space used). So it will be taken care that, vertices condensation will take place before this step.<br />
<br />
Singular edges have constituent singular vertices. They are first removed through cutting. <br />
Each vertex has a list of faces that reference it. Around a vertex, when one cycle of connected components are found, if the number of faces in that cycle is not equal to the total number of faces that contain the vertex (valency), then it is singular. <br />
By going through the face list of singular vertices, the number of connected components can be found. If there are n connected components, make n - 1 copies of the vertex and assign each of the connected components discrete labels of the vertex. This makes the mesh devoid of singular vertices. <br />
At this step we have removed all singular vertices and edges, but we would like to stitch together some of the erstwhile singular edges to preserve the geometry.<br />
Stitching of edges can take place only when the configuration after stitching does not produce any singular elements. <br />
Stitching of two edges can take place when the faces containing the edge have the same normal. This condition is subject to change. <br />
<br />
Shells must have consistent orientations <br />
<br />
There is support for this in the existing code. We check if each face if oriented according what is mentioned in the rt_bot_internal structure (if it is oriented, that is), and if not we flip the orientation. <br />
<br />
Links to the algorithms I intend to use:<br />
AVL Tree method for vertex merging - Generating Topological Information from a "Bucket of Facets" - Rock and Wozny, 1992<br />
Zippering algorithm for gap and T - joint closing - Progressive Gap Closing for Mesh Repairing, Borodin et. al, 2002, Stitching and Filling: Creating Conformal Faceted Geometry, Patel et. al, <br />
Stitching algorithm for gap and T - joint closing - Filling gaps in the boundary of a Polyhedron, Barequet and Sharir<br />
Removal of overlaps - Zippered polygon meshes from range images, Turk and Levoy<br />
Triangulation of holes - A robust hole-filling algorithm for triangular mesh, Zhao et. al<br />
Removal of degeneracies - Automatic mesh-healing technique for model repair and finite element model generation, Chong, Senthil Kumar, Lee<br />
Deliverables:<br />
Patch containing functions for removal of gaps and T-joints.<br />
Patch containing functions for removal of overlaps.<br />
Patch containing functions for triangulation and correcting of holes.<br />
Patch containing functions to identify all the defects and set the right callbacks<br />
Development Schedule:<br />
<br />
Community Bonding Period: The exact layout of where in the codebase to include all the functionalities will be discussed with the mentor and decided. Certain situation have ambiguities as to which approach to take; this will also be clarified. Other than that, suggestions for improvements on proposed methods will also be taken from the mentors. <br />
<br />
Week 1 (May 23rd to May 29th): Changes in the existing code (vertex merging using AVL trees and setting face adjacencies in the bot_edge structure)<br />
<br />
Week 2 (May 30th to June 5th): Testing changes made in the existing code<br />
<br />
Week 3 (June 6th to June 12th): Gaps and T-joints - Zippering<br />
<br />
Week 4 (June 13th to June 19th): Gaps and T-joints - Stitching<br />
<br />
Week 5 (June 20th to June 26th): Gaps and T-joints - Testing<br />
<br />
Week 6 (June 27th to July 3rd): Overlaps fixing<br />
<br />
Week 7 (July 4th to July 10th): Overlaps - testing<br />
<br />
Week 8 (July 11th to July 17th): Hole - filling using AFM<br />
<br />
Week 9 (July 18th to July 24th): Hole - filling testing<br />
<br />
Week 10, 11 (July 25th to August 7th): Detection of all errors in meshes and setting the appropriate callbacks to existing features and added features.<br />
<br />
Week 12, 13 (August 8th to August 23rd): Buffer period. Code cleanup and final testing of all functionalities. Documentation. <br />
<br />
If time permits:<br />
<br />
Manifold connectivity checking of the meshes.<br />
Degeneracy removal<br />
Make a command ‘heal’ with parameters - small gap tolerance, large gap tolerance, minimum edge length allowed, face factor. And provision could also be made to skip any particular step in the mesh healing process. <br />
<br />
These parts are less essential to mesh healing than fixing gaps, holes, etc. are. Thus, if I end up going ahead of the schedule, these tasks will be done. If not, they will be done after the GSoC coding period ends.</div>Tandoorichick