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

Code cleanup to rename uses of rt_nmg_ to nmg_

completed by: javamonn

mentors: Sean

BRL-CAD's NMG library provides hundreds of polygonal processing functions.  They used to be in a separate library, then they were underneath our librt library, and now they are back out into their own library.  Pretty crazy, but code that survives is under constant evolution.

This task is a cleanup task to rename all instances of rt_nmg_ to nmg_ while NOT modifying the librt-specific rt_nmg_*() functions.  That is to say that you'll update all functions and variables to not have the rt_ prefix except for the following functions:

  • rt_nmg_adjust
  • rt_nmg_bbox
  • rt_nmg_brep
  • rt_nmg_class
  • rt_nmg_curve
  • rt_nmg_describe
  • rt_nmg_export4
  • rt_nmg_export5
  • rt_nmg_free
  • rt_nmg_get
  • rt_nmg_ifree
  • rt_nmg_import4
  • rt_nmg_import5
  • rt_nmg_make
  • rt_nmg_mirror
  • rt_nmg_norm
  • rt_nmg_params
  • rt_nmg_plot
  • rt_nmg_prep
  • rt_nmg_print
  • rt_nmg_shot
  • rt_nmg_tess
  • rt_nmg_uv
  • also the rt_nmg_internal struct

You'll edit the source files, compile to make sure you didn't make a mistake, and create a proper single-file patch.  See http://brlcad.org/wiki/Patches

Code:

  • src/libnmg/*.c
  • src/librt/primitives/nmg/*.c
  • include/*.h