I saw recently that FreeCAD, the engineering program I played with once or twice in the past (it wasn’t ready for prime time), well it finally just reached its first official release version. I thought I’d give the new version a try, so I installed it (using Flatpak — probably a mistake, but it was the easiest choice in the moment) and got it running pretty quickly. The program looks the same, maybe a bit more polished, but it definitely works much better. That got me thinking…
There was a work project I automated years ago, then extended the automation; and then (after I retired) I decided to re-do the whole thing using FreeCAD and Python. Looking back, the actual project was a little bit boring, but playing with the programming was fun, and so I found my old programs, re-worked them a bit, and it worked great.
I won’t bore you with new pictures.
One difficulty I did run across was that FlatPak builds apps isolated in their own little sandboxes, with their own version of everything they might need in the sandbox with them, and the version of Python shipped with FreeCAD did not have some of the library moduless my original script needed. And I couldn’t for the life of me figure out how to install a library module in the sandboxed version of Python.
All I needed from the library module was a root-finding function, and in the end it was actually easier to just write my own function than continue messing with the libraries. Strangely enough, my script now runs slightly faster despite my function being less efficient (bisection in Python vs Brent’s Method in C++ or whatever), probably because I got rid of the of the slowdown of having to load that library. Once again, for small problems, small brute-force solutions have their (small) advantages.
(I don’t remember where I got the idea, all those years ago — I may have pulled it out of my ass made it up myself — but back in school I always thought that the magic number was 3000: when dealing with less than 3000 items, just use the brute-force approach.)
I also went looking for some of the models I made in my last go-around with FreeCAD. I found a few and moved them from my old laptop to my new one — backing up the old laptop along the way, I don’t think it’s long for this world anymore — but the one I wanted to find, a model of a forged tee I made, was nowhere to be found. Oh well, I guess I can re-litigate that one too, if I really want.