GSoC Proposal: Part Design Workbench Refinement

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
User avatar
kkremitzki
Posts: 348
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

GSoC Proposal: Part Design Workbench Refinement

Postby kkremitzki » Thu Mar 16, 2017 12:43 am

Introduction
The unfinished state of the Part Design Workbench (WB) is one of the major impediments to the release of FreeCAD’s current development version, 0.17. Fundamental changes were made to the way the workbench behaves as part of a long-term project called PartDesign NEXT, and much more powerful tools are now available for use. However, many of those tools have not been fully implemented into the user interface, and for some the workflow involving their use is buggy or confusing. Although some core functionality work is left, a great deal of the remaining work just needs time spent polishing. Thus, the refinement of the Part Design WB makes for a sensibly-sized project for one student developer over a summer.

Project goals
The purpose of the Part Design WB is to assist users in creating robust, parametric parts. These parts should also be ready for use and analysis in downstream workbenches like the FEM WB, the Assembly WB, or even a future Kinematics/Dynamics WB.

A few of the goals I’ve outlined are:

1. The most important word in the “definition” of the Part Design WB is assist. Confusing and buggy workflows must be eliminated, if time allows, or thoroughly documented on the project’s issue tracker, otherwise. Leveraging the community is key here. I may not be able to make all the bugs I encounter go away, but I can make them easier to fix. This is especially important considering the FreeCAD project’s dependence on upstream code. In particular, the OpenCASCADE geometry kernel is central to many of the Part Design WB’s tools.

2. One of the key ingredients to a useful Part Design WB involves keeping track of “where” the user is at in the modeling process. For example, if a valid & constrained sketch has just been created, it is ready to become the basis of a feature like a pad, pocket, groove, etc., and the user interface should present appropriate options to the user. Things like appearance and visibility of objects in the 3D view and tree view also need to be managed by this system. A great deal of work has been done in this regard by the project developer DeepSOIC in his Part-o-Magic module and so I should work with him if possible to test and integrate this functionality into FreeCAD’s core & the Part Design WB.

3. The Part Design WB itself must also be robust for a good user experience, and the way to ensure correct behavior of code in a distributed development environment involves unit testing. Currently, there are three unit tests in the Part Design WB, so there is a huge amount of improvement to be done. I hesitate to put quantity over quality here, but I would expect there to be at least ten times as many unit tests by the time I’m done—at a minimum there should be more than ten tests.

Timeline
The HEAD of the FreeCAD’s master branch is a fast moving target at around 15 pull requests per week on average, and thus writing a weekly timeline in advance does not seem prudent. A rough outline of my time management strategy over the course of the summer is as follows:

Community Bonding Period (May 4 – May 29)

This time will be chiefly spent studying the existing Part Design code, and I will likely also be studying DeepSOIC’s Part-o-Magic code. I will be spending a great deal of time on the bug tracker, monitoring incoming Part Design bugs, and testing out the workbench’s functionality. I will record deficiencies and create feature issues to organize the work on addressing the workbench’s shortcomings.

Work Period I (May 30 – June 30)

“If it’s your job to eat a frog, it’s best to do it first thing in the morning. And if it’s your job to eat two frogs, it’s best to eat the biggest one first.” - Mark Twain

It’s impossible to know today what the biggest “frog” will on May 30th. The two biggest that I know of know involve the “Boolean Operation” command being unintuitive enough to merit a forum thread, and the workflow management mentioned in goal #2. Workflow management certainly seems a larger topic at the moment, but it is actively being worked on by DeepSOIC and thus, by May 30th, it may end up being several moderately-sized “frogs”, instead.

Work Period II (July 1 – July 28)

This work period will likely involve a combination of general workflow improvements and the addition of unit tests to ensure that my newly added features don’t break upon subsequent development.

Work Period III (July 29 – August 29)

Major feature work should be concluded around halfway through this work period, and smaller, nice-to-have features can be worked on in the latter days of the project. Adding further unit tests would also be worthwhile. Depending on how Work Period I & II go, it may be better to spend some time improving documentation and engaging with the community to try to elicit and document bugs for future work.
User avatar
kkremitzki
Posts: 348
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: GSoC Proposal: Part Design Workbench Refinement

Postby kkremitzki » Thu Mar 16, 2017 3:29 pm

Oops, forgot to add--

This is the first draft of my GSoC proposal, so any feedback would be welcome!

Particularly, I'm not sure if more detail is appropriate or necessary, as it already seems quite long.
ickby
Posts: 2457
Joined: Wed Oct 05, 2011 7:36 am

Re: GSoC Proposal: Part Design Workbench Refinement

Postby ickby » Thu Mar 16, 2017 5:45 pm

Hello Kurt,

Thanks for the proposal. I will definitely give you some feedback, but I'm a bit in time pressure the next days. So sorry for the delay.
ickby
Posts: 2457
Joined: Wed Oct 05, 2011 7:36 am

Re: GSoC Proposal: Part Design Workbench Refinement

Postby ickby » Mon Mar 20, 2017 1:10 pm

Hello kkremitzki,

I'm have time to review your proposal today. I would prefere to use google docs, is that ok for you? This has the advantage o directly add comments tospecial parts of the proposal and makes a review IMHO way more intuiitive. If you are OK with it I would paste yor content to a google doc.
User avatar
kkremitzki
Posts: 348
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: GSoC Proposal: Part Design Workbench Refinement

Postby kkremitzki » Mon Mar 20, 2017 3:45 pm

ickby wrote:Hello kkremitzki,

I'm have time to review your proposal today. I would prefere to use google docs, is that ok for you? This has the advantage o directly add comments tospecial parts of the proposal and makes a review IMHO way more intuiitive. If you are OK with it I would paste yor content to a google doc.

Sure, that sounds good.
ickby
Posts: 2457
Joined: Wed Oct 05, 2011 7:36 am

Re: GSoC Proposal: Part Design Workbench Refinement

Postby ickby » Tue Mar 21, 2017 7:14 am

Hello Kurt,

thanks again for writing a proposal and sorry for the delai in reviewing. Here are my comments on your proposal:
https://docs.google.com/document/d/1kzP ... sp=sharing

If you would sent me your Mail adress in a private message I give you edit rights, so we could all work in that document. I think DeepSOIC is also going to add some comments to it.
DeepSOIC
Posts: 4662
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: GSoC Proposal: Part Design Workbench Refinement

Postby DeepSOIC » Tue Mar 21, 2017 1:21 pm

I prefer commenting here ;) dunno why...

I would love to also see you extending python interface for PartDesign. I have given it a start by exposing PartDesign::FeaturePython, but there are a few more fundamental classes that are require exposing, such as AddSub, Transformed, Datum.

I'm not sure if studying code of part-o-magic will be of any help. What will probably be more helpful is trying out part-o-magic as a user, figuring out what directions you like and what you don't, and sharing it. And integrating them into PD if appropriate.

I don't have any specific comments to the actual text of proposal, it is easy to read and is rather nice IMO. I have no experience with Google System On Chip Summer Of Code so far...
ickby
Posts: 2457
Joined: Wed Oct 05, 2011 7:36 am

Re: GSoC Proposal: Part Design Workbench Refinement

Postby ickby » Mon Mar 27, 2017 5:12 am

Hello Kurt,

as there is now one week till the end of proposal phase I would recommend to upload your proposal to the GSoC site in status draft. You cna still edit it there as long as you dont set it to final, but this gets the officiel workflow startet and you will see if there are any technical issues.

Regards,
Stefan
User avatar
kkremitzki
Posts: 348
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: GSoC Proposal: Part Design Workbench Refinement

Postby kkremitzki » Tue Mar 28, 2017 11:32 am

ickby wrote:Hello Kurt,

as there is now one week till the end of proposal phase I would recommend to upload your proposal to the GSoC site in status draft. You cna still edit it there as long as you dont set it to final, but this gets the officiel workflow startet and you will see if there are any technical issues.

Regards,
Stefan

Thank you for the advice. I just finished making revisions from your comments last time. I uploaded my draft to Google Docs but the formatting got a little butchered, sadly. I prefer using LibreOffice myself. You can actually add comments and stuff in it too, and it recently got some nice revision management changes. Regardless, the final PDF will look good! :D

Here's a copy:
GSoC2nd.odt
(35.16 KiB) Downloaded 24 times
ickby
Posts: 2457
Joined: Wed Oct 05, 2011 7:36 am

Re: GSoC Proposal: Part Design Workbench Refinement

Postby ickby » Tue Mar 28, 2017 12:13 pm

wow that proposal looks very detailled, perfect! I go thorugh it in detail and give you some feedback in the upcomming days.