Log
- 08/16/11
- Fixed edit support for batch operations and accepting multiple arguments.
- I disabled support for the batch operator as an argument to -x/-y/-z options. It isn't going to work without significant changes to several functions.
- Finished migrated get_solid_keypoint() to libged; all primitive types have a default keypoint.
- Began testing/recording working argument sets to translate.
- 08/15/11
- Started migrating get_solid_keypoint() to libged. BSPLINE and ARS are not working.
- Enabled -n option (use of natural origin, via get_solid_keypoint())
- 08/14/11
- Fixed -x/-y/-z options. They seem to be fully functional now. I'll take a step back and test everything more thoroughly once the other major issues are resolved.
- Tracked down several bugs in edit.c
- 08/13/11
- 08/12/11
- Worked on getting -x/-y/-z options working
- Fixed several bugs in edit.c
- Fixed a couple ged_path_validate bugs
- 08/11/11
- The translate command works for many (most?) cases now:
- translate 0 0 obj
- translate -a 5 0 10 obj
- translate -k obj -a obj2 obj3
- translate -k 21.7 3 -r 10 20 30 obj
- translate -k obj1 4 1 7 -r . obj
- Here are the translate features that don't work yet:
supplying multiple objects to translate (and obviously the "." batch operator isn't incredibly useful until this is fixed)- specifying individual coordinates is untested (-x/-y/-z),
such as:
- translate -z 5 obj
- translate -k -y obj1 4 2 -r 3.78 9 obj2
- using the natural origin of objects (-n)
- The translate command works for many (most?) cases now:
- 08/10/11
- Worked towards making -x/-y/-z options functional. This goes hand in hand with fixing multiple failures related to the simple "translate 5 obj" syntax. I basically forgot about those options when I was writing edit(); there is missing functionality all over the place. Lesson learned: put the full design in writing.
- 08/09/11
- Got translate working for a few narrow cases; "translate -k obj1 -a obj2 obj3" and "translate -a obj1 obj2" are tested, but there are problems with many other cases. Automatic redrawing doesn't work, so translated objects have to be blasted (this is a TCL issue).
- edit() wasn't handling arguments built with -x/-y/-z options. I wrote a function that fills in any omitted coordinates in the argument vectors. There are still some issues preventing this from working. Until it is, commands like "translate 5 obj" won't work.
- In commands like "translate 5 obj", 5 and obj were mistakenly being paired (5 was treated as an offset to obj). Works properly now.
- Plan
- Fix whatever is preventing translate from working (there may be an issue in the functions that get the apparent coordinates of objects).
- Test translate thoroughly
- This is an excellent waypoint; I'll test any odd/wrong combinations, trying to crash and find unhelpful/broken error messages.
- Begin work on the rotate subcommand
- Changed many edit.c variables/parameters to const's, which revealed several issues in edit.c and some in path.c.
- Batch arguments were expanding properly, but only the first set of arguments was being sent to the subcommands. I simply forgot about that.
- Several problems were revealed and resolved in adding the aforementioned capabilities to edit().
- Close to being done with the functions for converting arguments to coordinates; just need to test/debug. Actually, everything needs to be thoroughly tested/debugged now, since everything except the rotate/scale subcommands is practically done.
- Fixed batch argument expansion functionality.
- Wrote the body of the edit_translate() function.
- Removed all dead/obsolete code.
- Worked on functions for converting arguments from {path + object + offset} to absolute coordinates, since vect_t's are all the subcommand functions are designed to accept.
- Decided that the reason the bug from yesterday was so difficult to find, was that edit() was difficult to read/follow. I broke out the ability to perform batch argument expansion into another function, and created/modified several edit_arg helper functions.
- Not-so-fun day trying to find a bug.
- Many of the edit_cmd/edit_arg helper functions were out of date with recent changes. All known issues for code that existed prior to this week, were resolved this week.
- Added ability to expand batch arguments to edit().
- Further improvements to generic argument handling. Ex: enforcement of the rule that '-k' makes '-a/-r' mandatory for every command that uses those options.
- Set up subcommand functions, with pointers to those functions in the edit_cmd struct array.
- Improvements to ged_edit() option/argument parsing.
- Changed union edit_cmd args to pointers(which led to many other changes).
- Lots of debugging. Tracked down several edit.c bugs.
- Wrote the body of the command-specific argument handling function for translate, edit_translate_add_cl_args().
- Wrote several other command-specific functions for all currently planned subcommands (translate/rotate/scale), to help with initialization, looping through arguments, etc.
- Worked on getting generic sub-argument handling working in ged_edit.
- Added a basic help subsystem for ged_edit and its subcommands.
- Implemented support for reading multiple sub-arguments per option.
- Changed how subcommands are added to the edit command.
- Added a help system to ged_edit, which displays the longest synopsis available for a given subcommand; the usage statement displays the shortest.
- Added validation of subcommand names
- Cleanup
- Changed name of alter -> edit throughout BRL-CAD
- Add edit command to Archer/MGED, and to all the special areas :)
- Add edit subcommands to Archer; start on making ged_edit aware of what command is calling it.
- Set up union, structs, and flags for subcommand handling
- Added helper functions for manipulating the argument structs
- Added examples to manual for scale command
- More corrections to manuals
- Made corrections to existing manuals
- Wrote manual for scale command
- Worked on manual for rotate command
- Design/mock manual page for the rotate command seems to be mostly done. It could probably use some more examples to ensure that I haven't missed anything.
- Plan for the week
Finish all 3 command mock manualsEnsure the proposed operations are acceptable to everyone (asked on mailing list)- Implement alter command syntax handling (WIP)
- Get translate working again (but through alter this time)
- Improved some things with the proposed translate command functionality.
- Resolved all known conflicts and ambiguities in rotate command manual page. Started adding to EXAMPLES section, to help define behavior further.
- Laid out skeleton of scale command's manual page
- Started inventing new rotate command behavior by writing a mock manual page for it, as inspired by translate command. Much more complicated, though.
- Revised translate command manual page per conversation with Sean.
- Started setting up for consolidating translate/rotate/scale -> alter, for common syntax handling.
- Proposed new functionality for the translate command, and wrote a mock manual page for it. Hashed out the details with Sean.
- Cleaned up some translate command logic.
- translate now supports all 4 types of translations mentioned yesterday.
- Plan
Work on making ged_translate() support the remaining 3 main types of translations- Add support for absolute positioning using preset or default keypoints
- Rename translate() (probably), and further prepare it for being exposed via ged_private.h
- Implement on ged_rotate() and ged_scale(). I may pull common functionality out of ged_translate() and put it into one large function or wrapper that handles all 3 commands, such as "ged_oed()", if they are similar enough.
- Implement one of the simpler commands on my list, to ensure that my GSoC milestone #2 is satisfied.
- Translation of all objects in a single combination's tree now works.
- Note: not including absolute translations using a keypoint, the
mged oed equivalents of the 4 main types of translations are:
oed / comb1.c/kp.s ;# all instances of comb1.c
oed comb1.c comb2.c/kp.s ;# only the instance of comb2.c in comb1.c
oed / shape.s ;# all instances of shape.s
oed comb1.c shape.s ;# only the instance of shape.s in comb1.c
- Isolated core of ged_translate functionality into a separate function, which will eventually be exposed so that other functions can use it (ex: otranslate)
- Wrote ged_validate_path()
- Quieted all 511 warnings about using number formatting other than %zu for a size_t argument.
- Plan
- The next step for the translate command is to perform the actual translations.
- Created a ged_is_path function to determine if db_full_path structs contain valid paths (this will be used by the translate command, at least)
- Fell behind on this log. I took the day off on Saturday, Sunday, and Tuesday.
- I've become more familiar with how the .g database is used internally, and also cleared up some misunderstandings of how the MGED oed operations work.
- Implemented fairly robust argument handling for translate command.
- Plan
- Continue working on 'translate'. The first target is a working command with defaults only.
- Started setting up the translate command (temporarily translate2 for mged)
- Reading code and messing around with MGED/Archer to get a handle on how oed works
- Replaced 'erase_all' command with 'erase -r'
- Reading code; I couldn't really get anything accomplished today, so perhaps we'll call this my day off.
- Plan
- Start work on migrating next set of commands
- Tried to fix a bug in Archer's ls command, where any arguments are echoed, regardless of whether they are objects. Identifying the problem was the easy part... it would be complex to fix it properly.
- Tracked down a commit that revealed a bug, which prevented ray-tracing.
- Fixed a bug in Archer/MGED man command handling
- Fixed a bug in ManBrowser
- Fully documented and cleaned up ManBrowser
- Did a manual inspection of all 58 lsort calls, and ensured that any lsearch's that immediately followed them used the -sorted switch to force binary rather than linear searching.
- Plan
- Patch bugs, clean up Archer commands, etc.
- Continue reading code to figure out how a libged registry might work.
- Spent about 1/2 the day trying to build with cmake (I've been using automake up until now). Ended doing a fresh checkout and building outside the source directory, as recommended by ``Eric.
- Committed all of the patches that I had submitted before I was given commit access.
- Reading code to gain an understanding of how a libged registry might be constructed.
- Made ManBrowser fully operational as a replacement for existing faculties.
- Added -disabledPages and -enabledPages options to ManBrowser, to allow for fine-tuning of available pages.
- Modified Archer/MGED to use ManBrowser, and removed obsoleted faculties.
- Changed ManBrowser to inherit from iwidgits::dialog. It now creates the window properly, activates, loads the table of contents and Introduction.html. Selection binding of the ToC is not working yet. Still some cleanup to do.r
- Plan: I'd really like to have ManBrowser done within a day or two, so that I still have about a week before my first milestone. We'll see.
- Tried to figure out how to reliably center the Manual Page Browser without manually determining the center, etc. Could not get it working correctly if my life depended on it.
- Read a chapter on Itcl, and made some changes to ManBrowser because of it.
- I received commit access today, so I cleaned things up so that I could start committing regularly. I submitted my working changes to the man command, and my nonworking progress on the ManBrowser mega-widget.
- Reading documentation today.
- Since the man command was made functional yesterday, today I started work on moving it into it's own file/class in tclscripts/man_browser.tcl. The class is now partially functional, and Archer.tcl has been mostly modified to work with it. I'm having problems with some Itcl/Itk stuff, so it's back to the books tomorrow.
- I was still having problems today, but I knew that I really just need to read some more, so that's what I did. A couple hours later I figured out what I was doing wrong and made some progress.
- The man command only accepts commands that in fact have man
pages as an argument, launches the man page browser,
but I'm not sure how to load the page for a particular command yet.and loads the man page from the args. It appears to be fully working, plus improvements. There is still some refactoring/cleanup to do, though. - Note: It would be nice if the man page browser TOC would jump to
commands based on keyboard input, or if it had a filter. I've
proposed it in #brlcad; I'll look into this once
I have a better handle on thingsI'm done migrating it.
- Reading documentation. Resuming migration of man command tomorrow.
- Started logging progress to this wiki.
- Submitted patch 3309910. This modifies Archer's opendb command, so that when no arguments are passed it behaves similarly to MGED. There is a small bug that I'm not sure how to fix yet.
- Taking (probably) the rest of the day to read Tcl/Tk and Itcl documentation.
- Mostly done adding the man command to Archer; running into a wall with my Tcl/Tk and Itcl knowledge.
General plan
My development timeline is rear-loaded. My plan is to migrate the 2
commands in each of the first two milestones quickly. I can then focus
on cleaning up Archer commands in order to become proficient with the
relevant code. The remaining commands will be more challenging, so this
will help later on.
The focus of my work during GSoC has changed from my submitted proposal. I am working not only on migrating the oed commands to libged, but on adding entirely new capabilities as well.
- What's left is:
path + object + offset to vect_t conversion functions- resolve issues relating to batch operations
- enable use of natural origins of objects as points
- most rotate functions
- most scale functions
- converting mock-manuals in edit.c into actual man pages
My plan for the remainder of GSoC (and beyond) is as follows. The
first order of business is the object conversion functions. Once those
are finished, I will thoroughly test everything that is done so far
using the translate command. The rotate command is next, which may be
challenging due to the versatility of the design in performing
rotations. I believe that it will be possible to complete it in phases,
however, adding support for only a few argument groups during each
phase. Therefore, the first phase will probably support arguments
similar to the translate command. The translate and rotate commands are
probably much more important than the scale command, so the remainder of
GSoC may well be spent perfecting them. I estimate that I won't be able
to start on the scale command and the mock-manuals until after GSoC has
ended.
Having been a 3d modeler for several years, there are certain functions that I found to be of such value, that it seems that every modeling program should have them. Likewise, there are functions that I have never seen implemented, but would be of great use (ex: why is it so difficult to simultaneously rotate the same faces of a large number of objects towards the same point?). Once everything is completed, I may experiment with adding additional commands (ex: mirror, align) or additional options (ex: using the midpoint between two 'or more' objects as an argument).
Original Development timeline (from proposal)
- June 14th
- Milestone 1
- A minimum of 2 commands will have been migrated to Archer by this date.
- Milestone 1
- July 5th
- Milestone 2
- A minimum of 4 commands will have been migrated to Archer by this date.
- Milestone 2
- July 5th to 11th
- Prepare for mid-term evaluation: cleanup, review, handle of unanticipated issues
- July11th – July 15th
- Mid-term evaluations due
- August 2nd
- Milestone 3
- A minimum of 7 commands will have been migrated to Archer by this date.
- Milestone 3
- August 16th
- Suggested 'pencils down' date
- Milestone 4
- A minimum of 10 commands will have been migrated to Archer by this date.
- August 16th - 22nd
- Prepare for firm 'pencils down' date: cleanup, review, handle unanticipated issues
- August 22nd
- Firm 'pencils down' date