Latest revision |
Your text |

Line 160: |
Line 160: |

| ** m_u and m_v is updated in the surfaceBBox() and initialBBox() functions so that they are valid when we calculate the surface sub-patches. | | ** m_u and m_v is updated in the surfaceBBox() and initialBBox() functions so that they are valid when we calculate the surface sub-patches. |

| ** Fixed some small bugs in the surface-surface intersection function (copy-paste un-modified). Now that the second step of SSI is finished - points on the curve have been created. | | ** Fixed some small bugs in the surface-surface intersection function (copy-paste un-modified). Now that the second step of SSI is finished - points on the curve have been created. |

− | ~~* July 17~~
| |

− | ~~** Fit the points into NURBS curves using polyline approximation.~~
| |

− | ~~** TODO: (1) Calculate max_dis according to the size of the biggest bounding box. Tests are needed to define a better threshold. (done) (2) Implement a method to test SSI (maybe extend the brep command in MGED with an option "intersect"). (done)~~
| |

− | ~~* July 18~~
| |

− | ~~** Fixed the copy crashing by using pointers to the intersection curves.~~
| |

− | ~~** Added an option to the brep command in MGED to test surface-surface intersection. The syntax is: brep obj1.brep intersect obj2.brep i j . This syntax is used mainly because it's easy to implement.~~
| |

− | ~~* July 19~~
| |

− | ~~** Fixed the bu_malloc(0) failure in surface_surface_intersection().~~
| |

− | ~~** Uploaded an image of the intersection of a sph and an ehy.~~
| |

− | ~~** TODO: The current intersection routine doesn't work well with plane surfaces, because the bounding box of a plane surface has no volume. (done)~~
| |

− | ~~* July 20~~
| |

− | ~~** Calculated the threshold according to the size of bounding-box.~~
| |

− | ~~** Uploaded an image of the intersection of an epa and a tgc. (Two intersection segments)~~
| |

− | ~~* July 21~~
| |

− | ~~** Modified the brep command so that the max_dis value can be inputted manually within the command for testing.~~
| |

− | ~~** There are still problems with the current intersection: sometimes we get too few points to fit an ideal intersection curve.~~
| |

− |
| |

− | ~~== Week 10 ==~~
| |

− | ~~* July 23~~
| |

− | ~~** Intersection with a plane surface works well now - for a BBNode with no children within the max depth, copy itself as its child. (An image of related results was uploaded.)~~
| |

− | ~~* July 24~~
| |

− | ~~** There is a trade off between performance and result quality. If we use bigger INTERSECT_MAX_DEPTH (i.e, 10 instead of 8), we get better results but it costs more time.~~
| |

− | ~~** Calculated the coordinates of the intersection points in UV parameter spaces. The next step is to make use of these coordinates to create 2D trimming curves.~~
| |

− | ~~* July 25~~
| |

− | ~~** Do not generate the whole surface tree - only a small useful subset is generated simultaneously with the intersection process. Much faster.~~
| |

− | ~~** TODO: use the tolerance value instead of a constant INTERSECT_MAX_DEPTH.~~
| |

− | ~~* July 26~~
| |

− | ~~** Do not copy the node as its child - just pass it to the next iteration.~~
| |

− | ~~** Fixed the memory leak introduced by this morning's modification.~~
| |

− | ~~* July 27~~
| |

− | ~~** Calculated the intersection curves in UV parameter spaces (trimming curves), and extended the brep command to test them.~~
| |

− |
| |

− | ~~== Week 11 ==~~
| |

− | ~~* July 30~~
| |

− | ~~** Modified brep_debug.cpp to plot the 2D trimming polyline curves better. Used KnotCount - 1 as the plotres to avoid the interpolation problems.~~
| |

− | ~~* July 31~~
| |

− | ~~** Some minor changes to the b-rep conversion functions in brep_debug.cpp. Free the allocated spaces.~~
| |

− | ~~* Aug 1~~
| |

− | ~~** The first step of manipulating booleans on NURBS b-rep objects. Added a function to /primitives/brep/brep.cpp which is going to deal with the boolean operations of b-reps.~~
| |

− | ~~* Aug 2~~
| |

− | ~~** Added a function in to deal with NURBS curve-curve intersection, which will be useful in evaluating booleans on NURBS.~~
| |

− | ~~* Aug 3~~
| |

− | ~~** Continued work on evaluating booleans on NURBS - generate new trimmed faces with intersection curves (not all situations are considered now, still WIP).~~
| |

− | ~~== Week 12 ==~~
| |

− | ~~* Aug 6~~
| |

− | ~~** Continued working on dividing trimmed surfaces. It's really quite complicated. Lots of further work and tests are needed.~~
| |

− | ~~* Aug 7~~
| |

− | ~~** The current method for partitioning a trimmed surface is not elegant and convenient. Looked for some materials online and found some valuable resources.~~
| |

− | ~~** Used a new method for partitioning a surface. Followed the algorithms described in: S. Krishnan, A. Narkhede, and D. Manocha. BOOLE: A System to Compute Boolean Combinations of Sculptured Solids. Technical Report TR95-008. Department of Computer Science, University of North Carolina, 1995. Appendix B: Partitioning a Simple Polygon using Non-Intersecting Chains.~~
| |

− | ~~* Aug 8~~
| |

− | ~~** Finished a draft of partitioning a surface. Modifications for special cases and tests are needed.~~
| |

− | ~~** Before starting to write code dealing with inside-outside tests, which is the final step to evaluated NURBS, the current routine of partitioning should be finished beforehand. But it's still a long way to go. I hope I can have good luck with it.~~
| |

− | ~~* Aug 9~~
| |

− | ~~** Added an option to the brep command in MGED to test boolean evaluations (currently only "union").~~
| |

− | ~~** The evaluation processes are still WIP. The final b-rep structure cannot pass IsValid() at present because edges and vertices are not added. Besides, lots of other modifications are needed.~~
| |

− | ~~* Aug 10~~
| |

− | ~~** Added trims, vertices, edges, etc. to the b-rep structure and checked its validity.~~
| |

− | ~~== Week 13 ==~~
| |

− | ~~* Aug 13~~
| |

− | ~~** Continued working on adding elements to the ON_Brep structure, trying to make IsValid() succeed. Did some clean up and fixed some bugs, and make the common parts into a separate function.~~
| |

− | ~~** Today is the suggested "pencils down" date. As for the project of evaluating NURBS objects, I think I do not have enough time left to finish it all. At present, faces can be partitioned into several trimmed faces, but some conditions are not considered and problems may still exist. As for the week left, I'd like to go back to the code I wrote all these months, do some clean up, add necessary documents, etc.~~
| |

− | ~~* Aug 14~~
| |

− | ~~** Modified add_elements() and tried using the ON_Surface::Pushup() method first.~~
| |

− | ~~** Some clean up on dsp_brep.cpp: modified comments, renamed a variable with typo, eliminated the debug output, and reduced using dynamic allocated pointers.~~
| |

− | ~~** Added comment before surface_surface_intersection() to describe the algorithm used in SSI.~~
| |

− | ~~* Aug 15~~
| |

− | ~~** Modified cline_brep.cpp, ehy_brep.cpp, epa_brep.cpp, eto_brep.cpp and extrude_brep.cpp and eliminated the memory leak.~~
| |

− | ~~* Aug 16~~
| |

− | ~~** Modified hyp_brep.cpp, part_brep.cpp, pipe_brep.cpp, revolve_brep.cpp, rhc_brep.cpp, rpc_brep.cpp, sketch_brep.cpp and tgc_brep.cpp and eliminated the memory leak.~~
| |

− | ~~** Did some clean up and added comments to /libged/brep.c.~~
| |

− | ~~* Aug 17~~
| |

− | ~~** Add documentation of the brep command in MGED to the wiki page. See: [[http://brlcad.org/wiki/MGED_CMD_brep]]~~
| |

− | ~~== Final summary ==~~
| |

− | ~~* The "Implicit to NURBS conversion" project was mainly done before mid-term evaluation. The milestones and previous goals in the original proposal are finished.~~
| |

− | ~~* After mid-term, I focused on the "NURBS Intersection" project, and add many useful features to BRL-CAD, such as calculating surface-surface intersection curves (both in 3d space and 2d UV space), splitting surface and generating new trimmed surfaces, etc.~~
| |

| | | |

| = Test Results = | | = Test Results = |

Line 261: |
Line 186: |

| [[Image:Cline implicit 1.png]] [[Image:Cline brep 1.png]] | | [[Image:Cline implicit 1.png]] [[Image:Cline brep 1.png]] |

| [[Image:Cline implicit 2.png]] [[Image:Cline brep 2.png]] | | [[Image:Cline implicit 2.png]] [[Image:Cline brep 2.png]] |

− |
| |

− | ~~* The intersection curve (green) of a sph (red) and an ehy (blue).~~
| |

− | ~~[[Image:Sph ehy.png]]~~
| |

− | ~~* The intersection curves (green) of a tgc (red) and an epa (blue). (Two segments)~~
| |

− | ~~[[Image:Tgc epa.png]]~~
| |

− | ~~* The intersection curve (green) of a plane surface (red) and an ehy (blue).~~
| |

− | ~~[[Image:Planar ehy.png]]~~
| |

| | | |

| = Original development timeline = | | = Original development timeline = |