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
kkremitzki
Posts: 1512
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: BCF Support GSoC Proposal

Postby kkremitzki » Sun May 12, 2019 1:03 am

pPodest wrote:
Fri May 10, 2019 4:32 pm
As to the point of nicely keeping track of the references, created documents and the journal I would have gone with a separate folder in the github repository that I will create for the later development. BUT the idea of @kkremitzki seems very appealing, and I think it fits our purposes perfectly. One question I already have, however, is: how are posts of different topics (e.g.: the different projects of GSoC 2019) differentiated? As I understand it is that it is just a chronological list of posts without a grouping with tags. Is it intended by you @kkremitzki that every project gets its own tag?
For the created documents I think it would be best if they are stored in an appropriate folder (maybe ./docs) in the github repository. In the journal then I insert references to the documents on github.
So the way GitHub pages works is that you first create a repository on GitHub called "username.github.io", see mine for example or the one for FreeCAD, and if you push HTML and stuff into this repository it shows up at https://username.github.io.

Then you create another repository, called e.g. "blog" (see the FreeCAD one for example, which you could fork and modify) and you manage that repository using nikola (see the docs here).

The posts there are chronological but you also can tag them.

Also, you'd just be managing your own repos for this on your personal GitHub account.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
pPodest
Posts: 18
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Sun May 12, 2019 8:45 am

hardeeprai wrote:
Sat May 11, 2019 1:29 pm
Don't think that way. Early discussion will be beneficial.
I try to change in that regard, because I don't really like sharing incomplete work, even though this approach will hinder anyone following it.
So what I did yesterday was mostly organisational, as kkremitzki suggested I cloned his github repo FreeCAD-Blog and set an own github page up for it. You can reach it under https://github.com/podestplatz/FreeCAD-blog . Till now I have created one post bringing together all the references (at least I hope that I got all) that were posted to this topic.
Besides the repository for the blog I created a new one for the plugin itself, and the documentation that belongs to it. In the ./doc directory you will find the first attempt on the UML Class-diagram. Note however, the class "Template" is just used for copy and paste. I used it to set the font to Sourcecode Pro, which was kind of tedious, and since I didn't know if these font changes translate to newly created classes too I have gone with the copy&paste approach. The classes presented in this diagram are all for representing the data from the markup.bcf file (except for the class "Project").

What still itches me a little is the situation on the right with SchemaConstraint and its subtypes. My intent here is to represent the constraints from extension.xsd (regarding TopicStatus, TopicPriority etc.) as a type in python. Ideally I want this type to be an enumeration, but that opens the problem of how are these types then created? The main issue here is that the constraints in extensions.xsd might change over time and I think manually adapting the enumerations is not that maintainable. This however creates the need of dynamic creation of these enumerations/classes in python. No I know that it is basically possible to create whole classes during runtime (as demonstrated in this blog-post). An advantage of this approach is that when the, let's say, status of a topic shall be changed it only can assume valid values, because these are the only ones available for this type. That means no need for extra code that checks the status variable. However this opens up another, not so small, issue: somehow the type system has to be enforced, since python is dynamically typed. That means the variables should not be directly accessible by the user, otherwise additional code has to be written that checks whether the type of a variable is the correct one. But as I plan it, an dedicated interface for manipulation exists anyway.

Another (hybrid-)approach comes to mind: The classes are created empty and during startup the plugin parses extension.xsd and fills the enums with the possible values.

In the end I still have to think about how it is done best, and what is the most maintainable version.

I hope I could convey these ideas somewhat understandable.
User avatar
pPodest
Posts: 18
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Sun May 12, 2019 8:49 am

Kunda1 wrote:
Fri May 10, 2019 5:43 pm
pPodest wrote:
Fri May 10, 2019 4:32 pm
I still have one rather unrelated question: Is it possible in the freecad forum to subscribe to a thread/topic, so that an eMail is sent out for every new post?
I think I do something wrong, because I don't see that button with the wrench :roll:
But I will try it with the option "Notify me when a reply is posted" before submitting a new post, that I only became aware of during writing my previous post :D
User avatar
pPodest
Posts: 18
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Mon May 13, 2019 6:08 pm

Hi all,

I created a new blog post which you can view here: podestplatz.github.io .

TL;DR I mostly finished the representation of the markup.bcf file (the data part and the relations between the classes). I also thought i found a little inconsistency, which, however, resolved (in my mind) while writing this post. That means the middle paragraph of the blog post Representing markup.bcf in UML is unnecessary. I will update it tomorrow.

Cheers,
Patrick
User avatar
kkremitzki
Posts: 1512
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: BCF Support GSoC Proposal

Postby kkremitzki » Mon May 13, 2019 6:21 pm

Looks great! You might want to remove the old posts from the FreeCAD blog though.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
yorik
Site Admin
Posts: 11026
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BCF Support GSoC Proposal

Postby yorik » Tue May 14, 2019 12:36 am

Excellent! Very good start already.

The diagram looks good. I attached it here for the lazy :)
UML-classDiagram.png
UML-classDiagram.png (203.3 KiB) Viewed 170 times
Maybe the BIM snippets will be hard to integrate correctly as I'm not sure we'll find many apps that use it.. (Duncan and Bernd might know better). You might want to treat that part with lower priority so it doesn't hinder your progresses...
User avatar
pPodest
Posts: 18
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Tue May 14, 2019 3:44 am

kkremitzki wrote:
Mon May 13, 2019 6:21 pm
Looks great! You might want to remove the old posts from the FreeCAD blog though.
Thanks, but most of the work was already done ;) With the next post your old posts will be gone.
yorik wrote:
Tue May 14, 2019 12:36 am
Excellent! Very good start already.
...
Maybe the BIM snippets will be hard to integrate correctly as I'm not sure we'll find many apps that use it.. (Duncan and Bernd might know better). You might want to treat that part with lower priority so it doesn't hinder your progresses...
Thank you for the input. I will contact Duncan and/or Bernd to clear the fog around BimSnippet :)
But for now, as you suggested, I will give it a low priority
User avatar
pPodest
Posts: 18
Joined: Sat Feb 16, 2019 3:18 pm

Re: BCF Support GSoC Proposal

Postby pPodest » Thu May 16, 2019 4:48 am

Hi all (again),

I didn't get as fast as far as I wanted the last three days, but now I am finally finished with the first version of the class diagram for representing the data.
Image

I am still not that happy about the situation with the schemaConstraints. I think before I start writing code that generates these enumeration classes dynamically, I will focus on the whole functionality. What are your thoughts on the schemaConstraints situation?
Today I will finally start walking through the Qt Designer manual. I hope that by the end of the week I can present a design prototype of the widget.

A question I have regarding the blog: is it ok for you if don't post a forum post every day but still create a blog post (every day) about my advancements? Or do you rather prefer both?

Cheers,
Patrick
Attachments
UML-classDiagram.png
UML-classDiagram.png (203.36 KiB) Viewed 104 times
User avatar
yorik
Site Admin
Posts: 11026
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BCF Support GSoC Proposal

Postby yorik » Thu May 16, 2019 3:23 pm

Great!

Your diagram is very complete and shows each and every feature of the BCF specs. That's very good and exactly what a plan needs to be :)
Now, BCF implementation out there by other platforms is, as far as I saw, well below that level and use only a few of these features. And this plan is pretty ambitious and probably quite ambitious for this GSOC project.

So, I would suggest you to keep it as a roadmap, and have also a priorities plan. What you are going to implement first, and, above all, define at which point you want to have a result that works, and which features can be implemented later on, after that point. I think your first GSOC proposal is a very good guide for it, basically have a viewer working, that can show issues, allow to handle comments, and zoom the model.

Regarding your blog, no, I don't think it's necessary to post everyday at all. For me it is not absolutely needed to log something everyday. Sometimes we need a day or another to think how to do things. The important is that you keep a more or less sustained and regular effort throughout the GSOC period. What about you @hardeeprai?

What I would ask you is to keep checking this thread more or less everyday, as it is our main communication channel. But no worries, you're doing that already. For me everything is going fine and we are on the right track.

Also, small favor, could you make a signature for yourself on this forum, and add your blog url to it? Easy for the lazy people like me to not have to look for it ;)
User avatar
hardeeprai
Posts: 146
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: BCF Support GSoC Proposal

Postby hardeeprai » Fri May 17, 2019 10:43 pm

yorik wrote:
Thu May 16, 2019 3:23 pm
Regarding your blog, no, I don't think it's necessary to post everyday at all. For me it is not absolutely needed to log something everyday. Sometimes we need a day or another to think how to do things. The important is that you keep a more or less sustained and regular effort throughout the GSOC period. What about you @hardeeprai?
@pPodest

As you are progressing well, so I will only suggest / give my opinion, but at the end, you will have freedom to do as per your liking. In my opinion, it is not necessary, to blog every day. You need to blog, when something useful or concrete is there.

On this form, you may discuss everything, your struggle, your failure. Seting a time in a day, before you sleep (say, at 10:00 p.m.), make a habit to post here in this thread. That may be a single line that you were not in a mood to do anything related to GSoC, and if you want to skip, it has to be planned; like:

Tomorrow I will be off GSOC (and away from Internet) to recharge myself, so will not post anything till day after tomorrow.

It will set a clock in your mind, which will enhance your productivity.

If you have not tried earlier, may try "Pomodoro" technique, and see if it work for you, Be aware, it does not work for everyone.

But you need to decide yourself, as too much discipline is BORING.

yorik wrote:
Thu May 16, 2019 3:23 pm
could you make a signature for yourself on this forum, and add your blog url to it?
and an Interesting slogan for your BCF project.
--
H.S.Rai