Difference between revisions of "User:Clouddrift/GSoC2014"

From BRL-CAD
(Remove redundant code)
(Extract NMG to be a stand-alone library)
Line 21: Line 21:
  
 
=== Extract NMG to be a stand-alone library ===
 
=== Extract NMG to be a stand-alone library ===
: The concept of manifold is critical to many parts of geometry and mathematical physics because it allows more complicated structures to be described and understood in terms of the relatively well-understood way. So it should be combined into a function-independent module. I should check the every lines of code in LIBRT, then move the NMG parts into a new stand-alone library named LIBNMG.
+
: The concept of manifold is critical to many parts of geometry and mathematical physics because it allows more complicated structures to be described and understood in terms of the relatively well-understood way. So it can and should be combined into a function-independent library. I will check the every lines of code in LIBRT, then move the NMG parts into a new stand-alone library named LIBNMG.
  
 
=== Add comments ===
 
=== Add comments ===

Revision as of 12:49, 14 March 2014

Project Title

Mesh Library Cleanup

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 excellent. It is far away from stable, rubost and easy-read. Sometimes It also causes some 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.

Detailed description

The current status of NMG

Now, this part of NMG is mainly located in raytrace.h and nmg.h where 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

For some reason, the NMG primitive is originally designed and implemented for a stand-alone NMG CAD. But the situation changed. Some level of current NMG structure can be replaced with some part in database structure. So they become redundant 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.
And I will make sure no side-effect indeed before removing them.

Extract NMG to be a stand-alone library

The concept of manifold is critical to many parts of geometry and mathematical physics because it allows more complicated structures to be described and understood in terms of the relatively well-understood way. So it can and should be combined into a function-independent library. I will check the every lines of code in LIBRT, then move the NMG parts into a new stand-alone library named LIBNMG.

Add comments

Add some proper comments into nmg.h for helping others being familiar with the API rapidly.

Unit test

Write some unit test for new ‘LIBNMG’.

Brief Background

I am a master 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

I like this open source CAD system and community. I believe I can learn rich experience and knowledge in connection with CAD from this project and other developers.

Why me

This project is mainly about NMG mesh that is more or less related to my study and work experience. I am sure I can finish it with high quality in time.

References

[1] http://www.scorec.rpi.edu/REPORTS/1986-1.pdf
[2] http://sourceforge.net/p/brlcad/mailman/message/28536100