Further OpenGL Geometry Editor GUI development
I propose to continue the development of the OpenGL Geometry Editor GUI effort began during Summer of Code 2008 through modifying the existing application to take advantage of the Qt application and UI framework and then taking advantage of the wide array of development tools, widgets, and libraries offered by the framework to rapidly flesh out the front end, with the ultimate goal of preparing a powerful and intuitive CSG modeling GUI ready for connection to the geometry service.
BRL-CAD is unparalleled in power and maturity in the small world of open-source CAD, and has a featureset capable of competing successfully with commercial CAD products. However, the suite has until recently, as an in-house tool, been targeted almost exclusively at small population of trained experts. As such, the current standard modeler, mged, is highly unintuitive, requiring extensive perusal of documentation before even relatively straightforward modeling tasks can be completed reliably. To make BRL-CAD a useful and attractive toolset for a wider audience, it is therefore critical to implement a more intuitive GUI without sacrificing the power offered by mged.
As a well-recognized need, this project was first addressed in a 2008 Summer of Code project which produced the beginnings of a working prototype based upon Ogre and RBGui. While it provides an attractive beginning, it lacks any actual editing interface, and suffers from limited potential for direct growth as a result of the selection of RBGui, which is unmaintained (to the extent that I found it unbuildable on Linux without numerous modifications), has a limited selection of widgets, has no design tools or other development aids, and lacks much of the higher-level functionality that can be found elsewhere. To remedy this, I propose to within the existing codebase swap out RBGui with Qt, an extremely powerful, well-documented, and widely-used application and UI framework, and is well supported on all remotely popular platforms, and popular itself to the extent that up to date binaries for it exist in most package management systems, offsetting the admitted problem presented by the notoriously slow build process of the framework. Additionally, a wide variety of development tools exist, which have the potential to accelerate prototyping immensely compared to the hand-coded measures necessary in the current implementation. Although Qt is traditionally rendered in software, making it seem an odd choice for use within an OpenGL context as RBGui is currently used, Qt recently gained support for this type of use.
Once I have successfully integrated Qt with Ogre and substituted it for all uses of RBGui, I will work to continue the efforts made last year to develop it into a complete geometry editor frontend based upon the Ideal Operating Environment concept around which the work up to this point has been based. In particular, I will work to construct a framework for the rapid prototyping of a highly usable GUI composed of actions accessible through multiple routes, including the command line and multiple GUI methods, and leveraging it to form an interface with functions to perform and display a variety of common basic editing operations. Support for actually performing these operations will be implemented through stubs wrapping libged functionality, to be replaced with use of the geometry service as soon as it is practical. This will allow a degree of actual functionallity sufficient to test the GUI design in practice, allowing for meaningful early analysis of the effectiveness of design decisions, which will support the direct evolution of the interface towards the greatest possible usability. Although the scope of functionality to be implemented will be inevitably limited by the time allowed for the Summer of Code, I hope to continue on with this project after the Summer's completion, as I believe strongly in the importance of such an interface to BRL-CAD's success, and the benefits such success has to offer to a diverse audience; as the sole example of high-quality open CAD software, bringing an accessible BRL-CAD into reality would not only benefit current users of such technology, but help make CAD accessible to those unable to afford the expensive licenses typically required for commercial options, potentially opening up a whole new world of open community-oriented design projects, paralleling with real-world products the massive success of open software.
To achieve these goals I will take advantage of my existing familiarity with both the BRL-CAD internals and the modeling interface (and power thereof) offered by mged, as well as experience with the popular Blender modeling and 3D graphics toolkit, the familiarity with C, C++, and many similar languages I've developed through years of self-motivated programming, and the familiarity with build systems, command line interaction paradigms, and diverse user interface designs conferred by regular use of Unix-based systems for both software development and everday tasks. Additionally, I will take advantage of my familiarity with the community, a result of my presence on IRC for most of the past year under the nick "Ralith," to engage with the current primary users of BRL-CAD for immediate feedback on my prototypes, in the interest of creating a tool that is not only attractive to new users, but powerful and intuitive to long-time users of the system as well.
Remove core library dependencies on TCL
BRL-CAD's core libraries, including libbu, libbn, libwdb, libged, and librt, currently take advantage of numerous utility functions provided by TCL. In the interest of promoting modularity and containment, I propose to remove all such uses, replacing them with use of existing functionality, and implementing new functionality in libbu, or elsewhere as appropriate, when no previous implementation exists.
As an exceptionally large and long-running project, it is critically important to the ongoing health of the BRL-CAD codebase, and thus to the productivity and even number of contributors, that in addition to the creation of new features and the removal of bugs, existing functional code be maintained in as clean, modular, and reusable a state as possible. This adds to the flexibility of the libraries concerned, and helps support present and future development by easing interaction and use of existing functionality. By lowering the amount of effort required to maintain and further extend the project, such work helps guarantee BRL-CAD's continued usability and advancement, ensuring that the vast amount of functionality it has to offer to CAD users is not wasted beneath in impenetrable layer of accumulated dependencies, quirks, and counterintuitive behaviors.
The use of the facilities offered by TCL, primarily a scripting language, throughout vast swaths of code which are entirely unrelated to BRL-CAD's scripting capabilities is therefore an ideal candidate for such refactoring. The removal of TCL from the core libraries will improve their usability through removing a large dependency in cases where TCL is not otherwise necessary and lower the barriers to the entry of new developers by removing the need for familiarity with TCL when modifying, extending, or even simply using many currently TCL-dependent functions. Additionally, in some cases the use of TCL is redundant, as such functionality is already available internally and should be taken advantage of. However, even in the cases where functionality available in TCL must be implemented from scratch, the removal of TCL as a dependency and the growth of libbu as a valuable utility library will benefit the project significantly.
Working to remove dependency on TCL from BRL-CAD will require working with numerous widely varied elements of the codebase covering the majority of the project's scope. In addition to the immediate benefit of TCL's removal from these sections to the libraries concerned, this will also have the side effect of familiarizing me with a great deal of the project's code, adding to my understanding of the project and helping to enable my ongoing participation in yet more deeply involved tasks. As such, this task will add to my own ability to make further useful contributions as a regular contributor to the project.
My familiarity with BRL-CAD's development conventions and internal structure as a past contributor and regular of the IRC channel (where I go by Ralith) will be valuable for the successful achievement of these goals. Additionally, my volume of past experience with C and C-like languages will aid my ability to interpret even poorly documented and unconventionally written code, and in successfully reworking such functions without interfering with existing functionality dependent upon them, while simultaneously easing future use. Finally, my familiarity with the use of tools such as regular expression substitutions to replace certain functions en masse and practices for the efficient location of code of interest within very large codebases with tools such as grep will aid in the efficient completion of this task within the limited time provided by the Summer of Code.