Google Summer of Code 2018 with FreeCAD

Hello all! This post is my final work product for GSoC 2018 for the FreeCAD project. The main center for communication for FreeCAD is the forums, but we also coordinated things through the #freecad channel on Freenode. The main thread for my project was here.

To summarize my project: FreeCAD is a complex application with an extensive dependency tree. The packaging situation has always trailed the tip of development, which means users don't get to see the best FreeCAD has to offer, and people trying to help new users have to deal with sometimes years-old bugs. The goal was to improve the general ecosystem of the FreeCAD stack, and to cut down on technical debt to make things easier moving forward. After some consideration it was decided to focus on Debian packaging since that would be the most 'ecologically good'.

I began with a rough knowledge of Debian packaging, but now feel competent enough to want to take over the maintenance of Debian packaging for FreeCAD and several other packages within the Debian Science Team, which will improve the free software engineering experience in Debian as well as its derivatives such as Ubuntu and Linux Mint. In fact, I plan on trying to offically become a Debian Maintainer and then Debian Developer. On the 4th of July during the middle of the project I drove to Houston for a GPG keysigning, so the wheels are already in motion.

This post will summarize my work throughout the summer chronologically, mostly linking to emails in the Debian Science mailing list, pull requests on Debian's Gitlab instance or Github, and to some repositories.

More detailed information can be found at https://salsa.debian.org/users/kkremitzki-guest.

Coding Period 0, Community Bonding Period (April 23 - May 14)

Coding Period 1 (May 14 - June 15)

  • Most of the first coding period was spent working on FreeCAD 0.17 packaging, as well as packaging Netgen 6.2.1804 and updating Gmsh to use OCCT, which I packaged prior to GSoC. I didn't finish them quite in time for submission within the first coding period. I also spent time working on packaging PySide 2, which is a dependency for FreeCAD's transition to Qt 5 & Python 3, but backed away after finding it was being worked on by others.

  • May 17: Netgen PR (Remove unnecessary backup files): https://github.com/NGSolve/netgen/pull/15
    • Preparation work for packaging Netgen, which is used as a mesher by FreeCAD.

  • May 25: Discussion of Netgen 6.2.1804 work: https://lists.debian.org/debian-science/2018/05/msg00101.html
    • This was just me announcing that I was working on this so as to help not duplicate work.

Coding Period 2 (June 15 - July 13)

Coding Period 3 (July 13 - Aug 14)

Now that GSoC is done I am excited to continue working within the Debian Science Team. Besides an upcoming FreeCAD 0.18 release, I have several packages I plan to make improvements to and to package for Debian, and ultimately to integrate into future FreeCAD workbenches as part of my plan to make it the ultimate 3D engineering toolbox!

Therefore, I must say thanks to the FreeCAD and Debian communities for working with me, and to my GSoC mentors and GSoC itself for providing me this wonderful opportunity. May it continue providing valuable opportunities for others for many years to come.

Looking Back on 2017

2017 has been an incredible year for me with lots of opportunities, but many challenges as well. In the spring, I got a (lab) teaching opportunity for a 50-student Measurement & Control of Biological Systems course, culminating in 17 teams making maze-solving autonomous robots. There's a higher level of mastery to be attained by teaching others, and in that regard, it was an incredible experience. Teaching, however, is well outside my comfort zone, and in that regard it had some difficulties.

In the summer, I was able to work on a Google Summer of Code project/pseudo-internship. Working in a mix of Python and C++ was again an interesting challenge since I'm much more familiar with the former than the latter, and even my experience with other languages lies on the Python side of the interpreted/compiled, dynamic/static typing divide. Still, it was an invaluable experience since C++ rules the domain of finite element analysis and computational fluid dynamics, which I want to explore further. Particularly, FreeCAD is the perfect vehicle for engineering computer modeling, so I have high hopes for my future with the project.

At the end of the summer, I passed the exam for the Linux Foundation Certified System Administrator. This was an opportunity provided by a scholarship given in part because of my work using Python to analyze the efficiency of backyard irrigation systems in the Yucatán back in early 2016, so it was great to finally see the culmination of that work. As a little celebration project, I decided to begin running my own Linux mail server, which has been a great success. There were a few hiccups with blacklists on Yahoo and Outlook, but I was ultimately able to get it working with all the major email providers.

I also embarked on a project I've been wanting to do for a long time: running my own Linux router. I found a great series of tutorials on setting up such a router using Ubuntu and the Pine64 board, and have had excellent results since.

I have also been spending time here and there researching a really promising project, FreeIPA. It's a sort of competitor to Active Directory in the identity management space, mostly made up of a combination of an LDAP, Kerberos, and certificate server. I'm running a sort of pseudo-small business in my home network using my FreeIPA server as a centralized authentication, authorization, and identity server, and it's been a great experience so far; I hope to apply it in reality with the FreeCAD project one day. Look out for future posts on the topic.

In the fall, I began my final year at Texas A&M. My capstone project and team was assigned. Our project involves analyzing the flood resiliency of the Houston area and proposing an ecological engineering design to improve that resiliency and mitigate the effects of future extreme flood events such as was seen during Hurricane Harvey. We are using an open-source toolchain involving PostGIS, Python, and QGIS, and the project is really quite exciting since our analysis could be applied to other coastal cities and regions facing extreme weather events in the future.

Altogether, it's been a great year, but I foresee 2018 being even better. If you're reading this, I want to wish you a happy new year with hope for the same!

GSoC Week 12: Final Work Product

Well, it's time to finally wrap up the summer!

It's been a really great and rewarding opportunity, so I first want to thank everyone at Google and beyond who helped put GSoC together, as well as my mentor Stefan Tröger for providing feedback and guidance.

I was able to work with code that ranged almost the entire stack of FreeCAD dependencies: from low-level OpenCASCADE code involving quaternions & transformations, geometry & topology; to the scene graph library Coin3D we have to thank for our pretty screenshots; the connection between C++ and Python code, which I have a feeling will be useful later in my engineering career; and all the way up to the Qt GUI in both C++ as well as its Python interface PySide.

As a result, I feel very prepared to continue working with the FreeCAD project and look forward to doing so. I really think it's a great program and hope to use it for many years in the future.

So again, my thanks!

The main goal of the project was to get test coverage of the Part Design Workbench, and to explore it to find showstopping bugs. The only remaining one involves a crash in ShapeBinder, discussed at https://freecadweb.org/tracker/view.php?id=2517.

I fixed quite a few bugs and I think the general experience with the workbench is better. Test coverage is there for all the tools, and I'd say the workbench is ready for the public, so now the major work is to release FreeCAD 0.17, the biggest FreeCAD release ever, with its new Part Design (no longer "NEXT") Workbench.

My other goal of improvements to Boolean Operation was made unnecessary by someone else's PR in May.

The last goal, improvements to the Attachment Editor, ended up being a little too big for this GSoC, and could even possibly serve as a good GSoC project for next summer, although whoever does it had better be fairly artistic at making explanatory yet small icons.

In my opinion, I'd say the summer was a success.

Altogether, my code contribution can be summarized with 7 PRs and one experimental branch:

PR's:

  1. https://github.com/FreeCAD/FreeCAD/pull/816

  2. https://github.com/FreeCAD/FreeCAD/pull/829

  3. https://github.com/FreeCAD/FreeCAD/pull/848

  4. https://github.com/FreeCAD/FreeCAD/pull/869

  5. https://github.com/FreeCAD/FreeCAD/pull/899

  6. https://github.com/FreeCAD/FreeCAD/pull/920

  7. https://github.com/FreeCAD/FreeCAD/pull/957

Experimental Attachment Editor/PartDesign Datum Tools branch:

Here's my summary posts, summarized:

  1. /blog/gsoc-week-1-recap/

  2. /blog/gsoc-week-2-recap/

  3. /blog/gsoc-week-3-recap/

  4. /blog/gsoc-week-4-recap/

  5. /blog/gsoc-week-5-recap/

  6. /blog/gsoc-week-6-recap/

  7. /blog/gsoc-week-7-recap/

  8. /blog/gsoc-week-8-recap/

  9. /blog/gsoc-week-9-recap/

  10. /blog/gsoc-week-10-recap/

  11. /blog/gsoc-week-11-recap/