BCF Support GSoC Proposal

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
pPodest
Posts: 71
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Mon Jul 22, 2019 7:10 am

yorik wrote:
Fri Jul 19, 2019 3:18 pm
Excellent, you're quickly becoming a pyside wizard :)
Haha thanks :D I am sure that there are still very many things that I don't know!
yorik wrote:
Fri Jul 19, 2019 3:18 pm
BTW next week there is a new GSOC evaluation, I think your work is fully up to date and going well, nothing special to do, but if you could write a small wrap-up, that would be great!
Yeah, I will do that! Just for clarification: Do you mean with wrap-up a short text what has been done so far, and what is possible with the plugin? Or, do you mean that I update the wiki page of the project?

I am asking because I had in mind to do it like last time and write a, probably rather extensive, update for the wiki page of the github-project.


EDIT: I just saw your post on the general GSoC 2019 thread. I will just do both. The short version will be posted here, and as soon as the update of the wiki page is finished, I will write a second post notifying you guys of the update. But just as a word of warning here: I don't know how short the "short" version will be. I have a habit of going deeper and deeper during the process of explaining something, and in the end I want to cover every little detail.
User avatar
yorik
Site Admin
Posts: 11458
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BCF Support GSoC Proposal

Postby yorik » Mon Jul 22, 2019 12:58 pm

Excellent! No worries, the short one can be long too ;)
User avatar
pPodest
Posts: 71
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Tue Jul 23, 2019 4:16 pm

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
Design decisions
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.
User avatar
pPodest
Posts: 71
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Wed Jul 24, 2019 1:16 pm

I have now finished the wiki page for the second coding period. If you find time for it please review it and tell me if you are missing something that has to be included. Thanks in advance for the feedback! :)

Here the link to the home page of the project's wiki.
User avatar
yorik
Site Admin
Posts: 11458
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BCF Support GSoC Proposal

Postby yorik » Wed Jul 24, 2019 5:13 pm

Amazing job, thanks!! I'll play a bit with your code tonight too.
User avatar
hardeeprai
Posts: 167
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: BCF Support GSoC Proposal

Postby hardeeprai » Thu Jul 25, 2019 1:05 pm

pPodest wrote:
Thu Jul 18, 2019 4:11 pm
Ya, well I fixed it ^^
As it turned out I didn't use the abstract classes properly. I forgot to send the sizeHintChanged event. This was the main culprit.
@pPodest

Great work till now.

The problem you were facing about the word-wrapping was false, as you found above.

Be assure, that for such common things solution are already there, the one need not do from the scratch. The issue remain is to find the correct library or function and read its document and implement it correctly. Which one can achieve, if determined, as you were able to do.

All the best,
--
H.S.Rai
User avatar
hardeeprai
Posts: 167
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: BCF Support GSoC Proposal

Postby hardeeprai » Thu Jul 25, 2019 1:17 pm

pPodest wrote:
Wed Jul 24, 2019 1:16 pm
I have now finished the wiki page for the second coding period.
Excellent GSoC project!
--
H.S.Rai
User avatar
pPodest
Posts: 71
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Fri Jul 26, 2019 5:14 am

Hi Hardeeprai, thanks for that advice! I had such an incident only yesterday with the clipping planes, where I missed to notice a constructor that did exactly what I was looking for to do on my own for at least one hour. But I spare you the details. ^^
hardeeprai wrote:
Thu Jul 25, 2019 1:17 pm

Excellent GSoC project!
Thanks, I am glad that you like it :)
User avatar
pPodest
Posts: 71
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Fri Jul 26, 2019 1:21 pm

Hi all, this is an update on my current status with the plugin.
So currently my main focus (at least for today) was an additional dialog box that makes all the data about a topic accessible to the user for inspection and modification. This work is still offline but attached you will find a screenshot, that hopefully clarifies what I mean ^^

In the first screenshot you will see a button "Details" right beside the ComboBox for the topics. If pressed this opens a new window, which is captured in the second screenshot.

What also still is missing is a query to the user for his or her email address if he or she wants to submit any changes to a comment or a topic.
Attachments
details_btn.jpg
details_btn.jpg (85.31 KiB) Viewed 377 times
topic_metrics.jpg
topic_metrics.jpg (65.14 KiB) Viewed 377 times
User avatar
pPodest
Posts: 71
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Sat Jul 27, 2019 8:56 am

This is the last update for this weekend. I know my latest update was just yesterday, but I made/finished some pretty nice stuff today which I wanted to tell you about.

So I revamped the mechanism with which the comment author's email address is retrieved. It does not have to be entered as part of the comment anymore. Now, when you try to make a change, anywhere in the UI of the plugin, you are queried with dialog to enter your email address. This happens only once per session. Further this email address is then used in subsequent changes as value for the XML node "<ModifiedAuthor>".

Then the topic metrics window, I posted yesterday about, is now online and can be inspected.

And I updated the master branch with the current state, and pushed it as release 0.1. As hinted in my evaluation (thanks yorik and hardeeprai for the nice words btw :) ), over the next couple of weeks, I am focusing on packaging the plugin while cutting back on the feature development.