This post shall serve as wrap up of the stuff that was added to the plugin since the last evaluation period (2019-06-25).
Recap of the state of last time
At the beginning of the last evaluation period the data model was finished, mostly. Nearly no work was done at this point on the programmatic interface or on the GUI. A BCF-file (project file) could already be read into the data model resulting in a reference to an object of the class Project
In the following paragraphs I, for one write about what was added to the plugin since last time, and for the other about the most important design decisions I had to make since last time.
Additions since last time
Most notably the plugin can be now used in a rudamentary mode as a standalone Qt application. Also attempts have been made to integrate the plugin UI into the FreeCAD task panel which went successful, but during the latest developments the integration into FreeCAD was not maintained. Thus it is not guaranteed that it can be started from inside FreeCAD.
The capabilities of the GUI are:
- Opening and saving a project
- Selecting a topic from the open project
- Listing all comments of the active topic in a customized fashion
- Displaying (at most) three snapshots, opening one in original resolution after a double click on it
- Displaying a list of viewpoints, with the associated snapshot as icon.
Apart from the Qt UI, the programmatic interface is now in a mature state offering the user the options to explore the project by requesting data through get*()
-functions. As well as exploring the project, elements can be added/modified and deleted to/in and from the project. In addition to the modification capabilities, the pI uses viewController.py
to apply visualization settings (definied insinde viewpoint.bcfv
) to the current active view inside the active document of FreeCAD. These visualization settings include:
- Selecting specified objects based on their IFC-ID.
- Setting the shape color of objects based on their IFC-ID.
- Setting the camera's orientation and position.
- Hiding objects based on their IFC-ID
The first major design decision I had to make was the adoption of the Model/View
(/Delegate)-Paradigm, as it is supported by Qt. The reason why I adopted it was that I wanted to make the code as maintainable as possible, that includes the ability to change the user interface withouth great modifications of the code accessing the underlying data. This can be nicely achieved by the Model/View paradigm, as here the models handle the access to the custom data source and provide the retrieved data in a standardized way to the views, which show the data to the user.
The second major design decision was that I implement a customized version of the deepcopy algorithm for each class comprising the data model. On wiki-page
a description of the underlying problem can be found, thus if you are interested please see the linked section.