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

Stub in a new 'lc' command for listing combinations

completed by: Andromeda Galaxy

mentors: Mihai Neacsu, Ishwerdas

Our LIBGED geometry editing library contains lots of small modular commands that are made available in mged and archer. We'd have a command called 'lc' but it's currently implemented in Tcl instead of C. We'd like to convert it to C, so one of two steps for this is to stub in the new command. There is another task for transcoding the logic. If the transcoding task is complete, use their lc.c file as your starting point.

This task involves stubbing in an 'ls' command. It doesn't need to do anything initially other than print a usage statement and actually work in both mged and archer when you run the command. Figuring out the latter is the majority of work for this task, but don't worry -- there are lots of examples to follow.

You'll want to download our latest SVN sources or update the VM image following http://brlcad.org/wiki/Compiling and compile BRL-CAD.

Then make your edits, make sure they compile and work, and submit them as a unified patch file (svn diff > my_changes.patch).

References:
  • src/libged/*.c <-- look here for hundreds of examples
Modify:
  • src/libged/lc.c <-- you create this
  • src/libged/CMakeLists.txt <-- edit this to add your new file
  • src/mged/setup.c <-- where you hook into mged
  • src/libtclcad <-- where you hook into archer
  • src/tclscripts <-- where you hook up a help string