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: 47
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Fri May 24, 2019 12:50 pm

Ok I will then go with the blog version :)

I am sorry that I didn't post anything regarding my attempts to fix my host system to build FreeCAD. I also talked with @m42kus about building FreeCAD on Arch, because he had his problems too, and he told me that I also just could start the virtual machine headless and then ssh into it. While the last part was not new to me, it was a surprise that virtual machines could also be started headless, when running in Virtual Box. So for the building FreeCAD I will be using virtual machines.

What I still want to mention regarding the first week of development is that I don't know how much hours I can put into the BCF project during the workweek. On the weekend however I will catch up, but I will try to do the most development hours during the normal workweek, in the future.

Now that I have a fairly advanced beginners knowledge about QtDesigner and how designs can be used in python code, I will create a first version of the plugin in QtDesigner. Expect it on Sunday at the latest. :D
User avatar
hardeeprai
Posts: 159
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: BCF Support GSoC Proposal

Postby hardeeprai » Fri May 24, 2019 11:07 pm

pPodest wrote:
Fri May 24, 2019 12:50 pm
Ok I will then go with the blog version :)
FOSS culture is quite flexible. You may do as you wish.

Another option be a sort of wiki page on your blog ;-)

Have a blog post entitled "Dev Logs", and write every day. one or two lines, about what you did, or you did nothing (if that is the case), but you are writing three EVERY day [IMO, that discipline make you more productive, but I mention earlier, we are FLEXIBLE].

And in a 2 or 3 day (or a week), when you matter to write a nice blog post, do so.

pPodest wrote:
Fri May 24, 2019 12:50 pm
I will create a first version of the plugin in QtDesigner. Expect it on Sunday at the latest. :D
All the best,
--
H.S.Rai
User avatar
pPodest
Posts: 47
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Sun May 26, 2019 1:35 pm

The idea with one continually updated post is better! Also thank you hardeeprai for the suggestion of the pomodoro technique! I downloaded the original e-Book and started following it over the last week, and it really helps a lot with staying motivated throughout the day! But I still have to get better in estimating the right number of pomodoros I need for a task :lol:

So as promised: attached you will find two screenshots of the mockup, as I envision the user interface of the plugin. The first row is solely dedicated to selecting a topic from an open BCF file. Then once opened the below list will show the comments, contained in the topic. In the end I want a comment to look different than it does now on these screenshots. I am thinking of a two row element, where the first row is substantially bigger than the second one and contains the content of the comment, whereas the second row should show the author and the date of creation. Also if a comment is linked to a viewpoint I want to make this visible by coloring the comment in a light shade of blue or any other non-signal-color. With a double click on such a comment the view of the object shall assume the settings defined in the viewpoint. For adding comments the text field and the "Add" button can be used.
Below the comment section a horizontal list of snapshots could be displayed which are shown in original size when clicked. If more than three snapshots are available in the topic then a horizontally scrollable list or a vertically expandable list would be a solution.
The last part is for showing the available viewpoints, in list form. Therefore I want, contrary to the screenshots, to hide the above mentioned parts and show the list with a button that, when clicked, shows the selected viewpoint. Because how I currently set up the UI, all the above parts are aligned in one vertical layout, with sublayouts, and no groups I couldn't show this in the screenshots. In the next version I want to add groups, like yorik's BIMBots plugin uses, and then have a comments and viewpoint group.

I hope this all is somewhat imaginable, the way I described it.
Attachments
mockup_with_viewpoints.png
Mockup showing a section for a clickable list of viewpoints.
mockup_with_viewpoints.png (136.43 KiB) Viewed 352 times
mockup_no_viewpoints.png
Mockup hiding the clickable list of viewpoints.
mockup_no_viewpoints.png (136.02 KiB) Viewed 352 times
User avatar
hardeeprai
Posts: 159
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: BCF Support GSoC Proposal

Postby hardeeprai » Sun May 26, 2019 10:52 pm

pPodest wrote:
Sun May 26, 2019 1:35 pm
...for the suggestion of the pomodoro technique!

<snip>

it really helps a lot with staying motivated throughout the day! But I still have to get better in estimating the right number of pomodoros I need for a task
That will take some time. Moreover for a new type of work, estimate may be come guestimate ;-)

For things which you repeat, estimate can be more realistic.

<snip>
pPodest wrote:
Sun May 26, 2019 1:35 pm
I am thinking of a two row element, where the first row is substantially bigger than the second one and contains the content of the comment, whereas the second row should show the author and the date of creation.
All looks great.

Would you like to keep provision for the author of comment to edit the comment, but keep a record of such changes?

pPodest wrote:
Sun May 26, 2019 1:35 pm
Also if a comment is linked to a viewpoint I want to make this visible by coloring the comment in a light shade of blue or any other non-signal-color. With a double click on such a comment the view of the object shall assume the settings defined in the viewpoint. For adding comments the text field and the "Add" button can be used.

Below the comment section a horizontal list of snapshots could be displayed which are shown in original size when clicked. If more than three snapshots are available in the topic then a horizontally scrollable list or a vertically expandable list would be a solution.
Fantastic. I would prefer vertical expandable.

pPodest wrote:
Sun May 26, 2019 1:35 pm
The last part is for showing the available viewpoints, in list form. Therefore I want, contrary to the screenshots, to hide the above mentioned parts and show the list with a button that, when clicked, shows the selected viewpoint. Because how I currently set up the UI, all the above parts are aligned in one vertical layout, with sublayouts, and no groups I couldn't show this in the screenshots. In the next version I want to add groups, like yorik's BIMBots plugin uses, and then have a comments and viewpoint group.
Good progress.

What will be the role of "save" button. To me, it looks redundant.

After writing comments, and hitting "Add", should save it.
--
H.S.Rai
User avatar
pPodest
Posts: 47
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Mon May 27, 2019 5:42 pm

hardeeprai wrote:
Sun May 26, 2019 10:52 pm

Would you like to keep provision for the author of comment to edit the comment, but keep a record of such changes?
Partially: Yes! I want to give the author the possibility of changing his or her own comments, but, apart from the modified date, I don't want to keep any change logs. Although the definition of the comment structure, in the corresponding XSD file suggests that also other people can edit the same comment. Especially the ModifiedAuthor field in the comment suggests this. I think it would make more sense if only the original author could edit his or her comment, like it is in this forum (for some timelimit at least).
Anyways the way I want to implement this is maybe with a double click on the comment which results in: an in place text edit element appears with the content of the comment ready to be edited and a button to confirm, or just a hit on the [Enter] key.
hardeeprai wrote:
Sun May 26, 2019 10:52 pm
Fantastic. I would prefer vertical expandable.
Thank you very much! I will do it vertically then :)
hardeeprai wrote:
Sun May 26, 2019 10:52 pm
What will be the role of "save" button. To me, it looks redundant.
Currently it looks redundant, I agree with you. I thought of it not to only save newly added comments, but also other changes that might be applied to the all encompassing project object (i.e.: the representation of the BCF file in a python data structure). Like a newly added viewpoint.
I still have to put some thought into this issue!


And since today is the first official coding day: here is a link to my dev log, and a link to the commit history of the plugin repository.

I will also put a link to the dev-log into my signature, for easier access, but for now please refer to the link posted above.
User avatar
yorik
Site Admin
Posts: 11249
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BCF Support GSoC Proposal

Postby yorik » Wed May 29, 2019 10:38 pm

Sorry about radio silence, I had a bit of a flu these days!

Excellent start!! Looking at your code now, that looks very good. I would use python's builtin tempfile module to get to the temp folder in a better multiplatform way in reader.py.

Regarding the UI, indeed there are probably things to add next, like more controls over the list of topics. I like having all the comments in one big text box, like in your mockup, it looks like a fluent conversation... But indeed it should be possible to edit or delete one single comment. I let you think about how best to do that :) Also the comment date should be visible.

About certain BCF files made by certain apps being not conform to the schema, this is something that happens a lot in IFC, so I would expect to find it with BCF too. I think we'll need more test files, and see how big the problem is...
User avatar
pPodest
Posts: 47
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Thu May 30, 2019 7:27 am

No worries, I hope you are well again
yorik wrote:
Wed May 29, 2019 10:38 pm
... I would use python's builtin tempfile module to get to the temp folder in a better multiplatform way in reader.py.
There already exists something like that? Well thank you for the hint, I will change it accordingly!
yorik wrote:
Wed May 29, 2019 10:38 pm
... like more controls over the list of topics ...
what are you thinking about? Do you mean like adding and removing topics? Well I want to integrate adding topics, but only after I have finished the BCF viewer part. But deleting topics would not make that much sense, does it? I can imagine that it is preferable to have a collection of all topics/issues at the end of a project or planning phase of a building project.

yorik wrote:
Wed May 29, 2019 10:38 pm
About certain BCF files made by certain apps being not conform to the schema, this is something that happens a lot in IFC
... well this will give some hours of headaches ^^ What would you suggest to do in the case that certain elements don't validate? With xmlschema I have the option to ignore non-conforming nodes and attributes during parsing the XML file. I could ignore them altogether and don't write them to the data structure, but this means that the data gets lost. Another possibility would be to define a new class that replaces every value currently in the class model. This class would then have two values, one indicating whether the corresponding node/attribute of the XML file could be parsed, and one that contains the parsed value of that node/attribute. If it could not be parsed then the plain XML code would be written to the value field instead. I hope this is somewhat understandable. Maybe the code example helps to clarify my point a bit:

Code: Select all

	class Element:
		self.valid
		self.value
		
	validNode = Element(True, "3")
	invalidNode = Element(False, "<node>3</node>")
And when writing, a distinction would have to be made between valid an invalid objects of Element. A valid one would have to be serialized into a xml element, a invalid one would be written directly to the xml file.
But the more I think about this approach, the more I don't like it.
Suggestions?
User avatar
yorik
Site Admin
Posts: 11249
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BCF Support GSoC Proposal

Postby yorik » Fri May 31, 2019 6:26 pm

pPodest wrote:
Thu May 30, 2019 7:27 am
what are you thinking about? Do you mean like adding and removing topics? Well I want to integrate adding topics, but only after I have finished the BCF viewer part. But deleting topics would not make that much sense, does it? I can imagine that it is preferable to have a collection of all topics/issues at the end of a project or planning phase of a building project.
I was more thinking about comments, not topics. It's true, you have a point there. We can think of a bcf file as a git repo where one would be unable to edit the history. But comments should still be editable because you could make a mistake writing it and would want to correct without having to rewrite it all over again.

But there could still be scenarios where you'd want to delete a topic or a series of topics I think. In any case this is not a very important or high priority thing, let's think more about it.

About non-conform BCF files, it is also true that we could play our part here and, sort of, "encourage" good BCF files :) Anyway, no need to worry about this while we don't have serious cases under our eyes. It will always be possible to add some exceptions..
User avatar
bernd
Posts: 7892
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: BCF Support GSoC Proposal

Postby bernd » Fri May 31, 2019 9:04 pm

Normally one can edit a comment of an issue, but it will remain in the history of the issue that the comment was changed. At least it is the way BIMcollab handles this.
User avatar
bernd
Posts: 7892
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: BCF Support GSoC Proposal

Postby bernd » Fri May 31, 2019 9:05 pm

Attached an simple example bcf generated with BIMCollab zoom which contains a clipping plane. If the bcf is reloaded in BIMCollabZoom viewer the clipping plane is restored. The pic shows the clipping plane.

bernd

bcfexmple1.bcf.txt
(80.35 KiB) Downloaded 8 times
remove .txt

bcfexample1.ifc
(5.66 KiB) Downloaded 9 times
bcfexample1.FCStd
(16.66 KiB) Downloaded 9 times