Editing User:Bhollister/Proposal

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:
 
= Title =  
 
= Title =  
  
Command-line Editing NMG Data-structures in BRL-CAD  
+
Command-line Editing NMG and BoT Data-structures in BRL-CAD  
  
 
= Abstract =
 
= Abstract =
  
This project will expose some of the low-level NMG routines to a command-line interface. Users will be able to add and remove various parts of the NMG data structure, such as regions and shells, along with manipulation of vertices, edges, and faces. Users will see the results displayed in either MGED or Archer.
+
This project will expose some of the low-level NMG routines to a command-line interface. Users will be able to add and remove various parts of the NMG data structure, such as regions and shells, along with manipulation of vertices, edges, and faces. A similar set of command-lines will allow for manipulation of "Bag of Triangles" (BoT) data-structures. Users will see the results displayed in either MGED or Archer.
  
 
Additional info: http://people.ucsc.edu/~behollis/hollisterGSoC2015Revised2.pdf
 
Additional info: http://people.ucsc.edu/~behollis/hollisterGSoC2015Revised2.pdf
  
 
= Benefits to BRL-CAD =
 
= Benefits to BRL-CAD =
BRL-CAD will gain a command-line interface for directly editing NMG data-
+
BRL-CAD will gain a command-line interface for directly editing NMG / BoT data-
 
structures via Archer. The new features will be:
 
structures via Archer. The new features will be:
* Ability to select subsets of an NMG via the command-line.
+
* Ability to select subsets of an NMG / BoT via the command-line.
* Ability to add and remove elements of an NMG while still satisfying validity constraints through the command-line.
+
* Ability to add and remove elements of an NMG / BoT while still satisfying validity constraints through the command-line.
* Ability to move parts of an NMG via the command-line.
+
* Ability to move parts of an NMG / BoT via the command-line.
 
* Visual feedback in the geometry window.
 
* Visual feedback in the geometry window.
  
Line 23: Line 23:
 
= Project Details =
 
= Project Details =
  
See [http://brlcad.org/wiki/MGED_CMD_nmg  MGED CMD nmg]. The new command ''design'' is similar to [http://brlcad.org/wiki/MGED_CMD_brep brep].
+
The fundamental data-structure for boundary representation in BRL-CAD is
 +
the NMG. It is an implementation of a radial-edge data-structure and does
 +
not enforce manifold constraints on mesh data. Boolean operations are closed
 +
under the B-rep data type, thus making the NMG the preferred representation
 +
for BRL-CAD.
 +
The NMG Library Interface [1] is fundamental to the functionality proposed
 +
here. There are broad categories of function calls that allow a high-level manipulation of the NMG data-structure in BRL-CAD. The categories are:
 +
* CONSTRUCTION ROUTINES; for example: nmg mm(), nmg mmr()
 +
* DESTRUCTION ROUTINES; for example: nmg kill(), nmg kr()
 +
* MANIPULATION ROUTINES; for example: nmg face g(), nmg face bb()
 +
 
 +
The NMG data-structure hierarchically stores the mesh by: regions →
 +
shells → f aces → loops → edges → vertices. Access into the data-structure
 +
is provided by the high-level manipulation routines. For instance, when pro-
 +
viding the ability of a table edit to change a vertex position, it will be nec-
 +
essary to update the specific vertex in the table via the the nmg vertex gv()
 +
routine. This routine requires a pointer to the vertex struct in the NMG data-
 +
structure that represents the vertex. Other manipulation routines, such as
 +
nmg ck closed surf(), i.e. “Check for a Closed Surface,” provide tools to enforce
 +
various validation constraints.
 +
 
 +
The command-line functions will mirror the existing API, but expose as
 +
much as possible. The interface may borrow some from the Blender low-level
 +
API, using the following (see http://wiki.blender.org/index.php/Dev:2.6/Source/Modeling/BMesh/Design):
 +
* BM vert createkill: Make Vert and Kill Vert
 +
* BM edge createkill: Make Edge and Kill Edge
 +
* BM face createkill: Make Face and Kill Face
 +
* bmesh semvjekv: Split Edge, Make Vert and Join Edge, Kill Vert
 +
* bmesh sfmejfke: Split Face, Make Edge and Join Face, Kill Edge
 +
* bmesh loop reverse: Reverse the loop of a BMFace. Its own inverse
 +
 
 +
For roughly half of the summer, similar and appropriate command-line meth-
 +
ods will be implemented for the BoT data-structure as well.
  
 
= Project Schedule =
 
= Project Schedule =
Line 31: Line 63:
 
* Week 2: Identify ways of specifying to the command-line the parts of model to be changed. For example, how to specify a vertex to a command that removes a vertex and update the NMG model in the render window.
 
* Week 2: Identify ways of specifying to the command-line the parts of model to be changed. For example, how to specify a vertex to a command that removes a vertex and update the NMG model in the render window.
 
* Week 3: Should be able to implement commands now. Allow two weeks to complete each type of command. Starting this week with NMG CONSTRUCTION ROUTINES.
 
* Week 3: Should be able to implement commands now. Allow two weeks to complete each type of command. Starting this week with NMG CONSTRUCTION ROUTINES.
* Week 4: CONSTRUCTION ROUTINES - initial take is to provide CLI for existing internal nmg_* api routines.
+
* Week 4: NMG - 2nd week for CONSTRUCTION ROUTINES.
* Week 5: CONSTRUCTION ROUTINES - initial take is to provide CLI for existing internal nmg_* api routines.
+
* Week 5: NMG - 1st week for DESTRUCTION ROUTINES.
* Week 6: CONSTRUCTION / DESTRUCTION ROUTINES.  
+
* Week 6: NMG - 2nd week for DESTRUCTION ROUTINES.  
* Week 7: CONSTRUCTION / DESTRUCTION ROUTINES.  
+
* Week 7: NMG - 1st week for MANIPULATION ROUTINES.
* Week 8: High-level design of nmg command. Implement face selection / face removal.
+
* Week 8: NMG - 2nd week for MANIPULATION ROUTINES.
* Week 9: design / work on nmg traversal + labelling for cli + cmface, mm, kill F, kill V, labelface
+
* Week 9: Start BoTs command-line command implementations. Starting this week with BoT CONSTRUCTION ROUTINES.
* Week 10: ditto
+
* Week 10: BoT - 2nd week for CONSTRUCTION ROUTINES.
* Week 11: ditto
+
* Week 11: BoT - 1st week for DESTRUCTION ROUTINES.
* Week 12: ditto
+
* Week 12: BoT - 2nd week for DESTRUCTION ROUTINES
* Week 13: move V, -i option for labelvert, make V, and make F
+
* Week 13: BoT - 1st week for MANIPULATION ROUTINES.
* Week 14: move V, -i option for labelvert, make V, and make F
+
* Week 14: BoT - 2nd week for MANIPULATION ROUTINES. Final fixes and clean-up.

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)