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

Convert (transcode) 'lc' command from Tcl to C

completed by: Andromeda Galaxy

mentors: Sean, Dishank

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 this step involves converting the Tcl logic into a simple C function.

Provide the translated logic as a function that does exactly what the lc Tcl code does, but without using any Tcl API. There is a separate task that stubs this command into LIBGED. If that task is complete, use their lc.c as a starting point and hook your logic up so the command works.

You'll want to download our latest SVN sources or update the VM image following 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).

  • src/tclscripts/mged/lc.tcl <-- this is the code we want converted to C
  • src/libged/lc.c <-- you create/modify this
  • src/libged/CMakeLists.txt <-- edit this to add your new file if it's not already added