Today was spent on a few different aspects of the project, with a brief interlude to deal with some external (car) stuff. First thing, I got caught up on emails/forums, then did a bit of shopping*, then on to programming! For better or worse, the changes I made aren’t involved in any new features, and didn’t address any specific bugs that I’m aware of (though, I did find a couple possible sources of bugs). But, I think it was a valid use of time because I learned a bit more about the internals of FreeCAD, and think I’ve also cleaned up those internals to a degree.
In object oriented programming, there’s a distinction between “is a” and “has a” relationships. My project today involved splitting one class into two, to make this particular area a bit more consistent and to allow for the use of one piece of functionality provided by the original class without the other.
Specifically, FreeCAD has several classes descended from a parent class Property, which are used to store various pieces of information to be saved into configuration or project files. These are the things that are modified by the Property Viewer. The refactoring I did today took a descendent of the PropertyInteger class – PropertyEnumeration – and made it instead derive directly from Property and contain a (new) Enumeration object. So, PropertyEnumeration now “is a” Property that “has an” Enumeration.
There are a number of reasons I worked on this, none of them is terribly compelling if taken alone, but to me it fell into a category of “things that I’d want a professional programmer to fix, but that I wouldn’t bother with as a hobbyist”. So, the project for tomorrow is to try out those changes in the Drawing-dev branch (which is where I came across a use case for them), then clean up and submit them for testing if they seem worth the trouble.
Also intend to tie up a couple loose ends in Drawing. I’d like to try a couple different options for constraining the position of the new isometric views, then there’s a bug that causes newly added views to not be scaled appropriately sometimes.
Oh! This evening I went over to the maker space and learned a couple interesting things. First, there’s a possibility that I can get access to some machine tools in town! Second, that it’s possible to print nylon with filament type 3D printers, and that some neat things can be done by designing air bubbles into 3D printed nylon parts. That’s got me thinking about a project that was discussed at South Pole – making a 3D ice printer. I’m sure someone has done it already, but it does seem like a fun party trick regardless.
* As for that shopping; I’ve arranged to buy a monitor (2nd hand local), and bought a 3D mouse (amazon). I’m quite intrigued by these 3D mice, looking forward to having one to play with aside from the obvious need to have one for work purposes.