Editing User:Clouddrift/GSoC2014
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Project Title == | == Project Title == | ||
:Mesh Library Cleanup | :Mesh Library Cleanup | ||
== Synopsis == | == Synopsis == | ||
− | :BRL-CAD has an extensive n-manifold (NMG) polygonal mesh library presently embedded within LIBRT. N-manifold can provide an arbitrary boundary representation structure. This part in BRL-CAD runs good but not | + | :BRL-CAD has an extensive n-manifold (NMG) polygonal mesh library presently embedded within LIBRT. N-manifold can provide an arbitrary boundary representation structure. This part in BRL-CAD runs good but not excellent, for it is far away from expected stable, rubost and easy-read. Sometimes it causes some awkward performance problem and some algorithm based on current NMG is inefficient. The purpose of this project is to clean, validate and verify relevant source code about NMG. |
== Concepts == | == Concepts == | ||
− | :Some important concepts should be | + | :Some important concepts should be clear before starting this project. |
=== Manifold === | === Manifold === | ||
− | :Manifold representation is commonly used in many commercial boundary based solid modeling systems. Kinds of data structures are useful to describe manifold solid. In early years, wing-edge data structure is widely accepted by researchers and companies. With the | + | :Manifold representation is commonly used in many commercial boundary based solid modeling systems. Kinds of data structures are useful to describe manifold solid. In early years, wing-edge data structure is widely accepted by researchers and companies. With developed of the theory, half-edge data structure exists. Splitting an edge into two half-edge makes it more flexible than wing-edge, especially when iterating elements. |
− | |||
− | |||
=== Non-manifold === | === Non-manifold === | ||
− | : | + | :Unlike manifold, Non-manifold is a geometric modeling term referring to topological situations which are not restricted to be two-manifold. It can define not only volume but also surface, curve and point in a single uniform representation. |
− | |||
− | |||
== Detailed description == | == Detailed description == | ||
=== The current status of NMG === | === The current status of NMG === | ||
− | :Now, this part of NMG is mainly located in raytrace.h and nmg.h where it is mixed with other irrelevant structs, macros and functions. It | + | :Now, this part of NMG is mainly located in raytrace.h and nmg.h where it is mixed with other irrelevant structs, macros and functions. It's not an ideal organization for other developers to read, use and maintain. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Remove redundant code === | === Remove redundant code === | ||
− | :For some reason, the NMG primitive is originally designed and implemented for a stand-alone NMG CAD. But the situation changed. Some levels of current NMG become redundant, since | + | :For some reason, the NMG primitive is originally designed and implemented for a stand-alone NMG CAD. But the situation changed. Some levels of current NMG become redundant, since it is possible to replace them with some parts in database structure now. Including: |
− | : | + | :1) ''model'': represents the whole geometry, which is similar to the content of BRL-CAD *.g file. |
− | : | + | :2) ''nmgregion'': sub-level structure beneath ''model'', which is similar to the BRL-CAD region struct. |
− | : | + | :3) Maybe others. |
− | :I will remove them as well as relevant macros and functions to | + | :I will remove them as well as relevant macros and functions to simply the problem. In the process, I should make sure there is no side-effect or new trouble introduced. |
=== Extract NMG to be a stand-alone library === | === Extract NMG to be a stand-alone library === | ||
Line 67: | Line 37: | ||
=== Add comments === | === Add comments === | ||
− | :Complement some proper comments for | + | :Complement some proper comments for header files in the new-built LIBNMG library. |
− | |||
− | |||
− | |||
− | |||
=== Unit test === | === Unit test === | ||
− | :According to the experience from other developers in community, it is | + | :According to the experience from other developers in community, it is absolutely that lots of bugs are hidden in LIBNMG. So it is necessary to write a systematic set of test case. With more bugs discovered and fixed, the new-built library will be more readable and stable. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | :In my opinion, since test-driven development is indispensable in this project, ''gtest'' will be a good choice for the coming unit test. | |
− | : | ||
− | |||
=== Documentation === | === Documentation === | ||
Line 107: | Line 48: | ||
== Schedule == | == Schedule == | ||
− | |||
− | |||
− | |||
− | |||
:*Week 1 (19 May - 25 May): Estimate completely the influence of removing abundant structs. Make sure nothing misses attention. | :*Week 1 (19 May - 25 May): Estimate completely the influence of removing abundant structs. Make sure nothing misses attention. | ||
:*Week 2 (26 May - 1 June): Remove the abundant structs and test briefly. | :*Week 2 (26 May - 1 June): Remove the abundant structs and test briefly. | ||
− | :*Week 3 (2 June - | + | :*Week 3 - 4 (2 June - 15 June): Move the NMG parts from LIBRT into a new-built library, LIBNMG. |
− | |||
− | |||
− | :*Week 6 ( | + | :*Week 5 - 6 (16 June - 29 June): Prepare for the mid-evaluation. |
− | :*Week 7 - 9 (30 June - 20 July): | + | :*Week 7 - 9 (30 June - 20 July): Write test case by using ''gtest'', and make sure everything goes well just like before and to fix bugs found. |
:*Week 10 (21 July - 27 July): Complement the comments for the new library. | :*Week 10 (21 July - 27 July): Complement the comments for the new library. | ||
Line 130: | Line 65: | ||
== Brief background == | == Brief background == | ||
− | :I am a graduate student in State Key Lab of CAD & CG, School of | + | :I am a graduate student in State Key Lab of CAD & CG, School of CS, Zhejiang University, China. I have 3-year work experience in programming a CAD module for an Optical Critical Dimension system in a conductor measurement company using Open Cascade. Now, my main research direction is something about hexahedral mesh. |
== Why BRL-CAD == | == Why BRL-CAD == | ||
− | : | + | :It's no doubt that much commercial CAD software is outstanding and amazing, but their high price of each copy decides that not everyone could get such a CAD tool to try and improve their unconstrained idea. We need open source software to make people free, free, and free more. I like this open source CAD system and community. I believe it is worthy to contribute efforts for BRL-CAD. At the meantime, I can learn rich and irreplaceable experience in connection with CAD from this project and other developers. |
== Why me == | == Why me == | ||
− | :I'm a graduate student of Zhejiang University, which is famous for its reputation in the field of CAD&CG research. I have good background in CAD | + | :I'm a graduate student of Zhejiang University, which is famous for its reputation in the field of CAD&CG research. I have good background in CAD theory and programming skills. What's more important, this project is mainly about NMG mesh that is more or less related to my research and work experience. I have written a CAD module for an optical measurement system, whose user-friendly interface promoted the company's sales. I am sure it is no problem for me to finish it with high quality in time. |
:And, I make sure I can dedicate at least 40 hours per week in this summer holiday. I understand clearly the importance of adequate communication with other experienced developers and theory experts, whose valuable suggestions can enormously save twists and turns. | :And, I make sure I can dedicate at least 40 hours per week in this summer holiday. I understand clearly the importance of adequate communication with other experienced developers and theory experts, whose valuable suggestions can enormously save twists and turns. |