Convert (transcode) 'lc' command from Tcl to CBRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Sean, DishankTags: geometry, C, code, listing, function

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 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/tclscripts/mged/lc.tcl -- this is the code we want converted to C
Modify:
  • 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
Uploaded Work
File name/URLFile sizeDate submitted
task-15-transcode-lc-tcl-to-c.diff11.4 KBDecember 08 2014 06:52 UTC
Comments
Andromeda Galaxyon December 8 2014 04:15 UTCTask Claimed

I would like to work on this task.

Jacob B on December 8 2014 04:24 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!

Andromeda Galaxyon December 8 2014 06:52 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 8 2014 07:41 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 8 2014 07:42 UTCoutstanding

Outstanding conversion.  It'd be interesting to see how the performance of this version compares to that of the tcl version.