GSoC/GCI Archive
Google Code-in 2012 BRL-CAD

Implement a function to convert triangle meshes to solid polygon mesh

completed by: Johannes Schulte

mentors: Sean

BRL-CAD implements numerous "primitive" 3D entity types. The Bag of Triangle (BoT) primitive implements simple triangle mesh geometry. Our N-manifold geometry (NMG) primitive implements solid polygonal mesh geometry. While we have a routine that converts an NMG to a BoT (mk_bot_from_nmg()), we do not have the reverse (mk_nmg_from_bot()).

This task implements the missing mk_nmg_from_bot() function so that the input triangle mesh is converted into the NMG data structures and stitched together appropriately.


  • src/librt/primitives/nmg
  • src/librt/primitives/bot


  • src/libwdb/nmg.c