triplus wrote: ↑Mon Aug 26, 2019 10:51 am
P.S. Or maybe you are talking about, on why there are not more initiatives like this:
It has occurred to me that there are numerous snippets of reusable code scattered throughout the forums and workbenches in python, but no developer's library, of sorts, to contain them. pivy is something like that, of course, and the stuff I'm writing might be useful in a pivy 2D graphics library context, perhaps.
But having a workbench that can act as a developers playground... maybe allows a dev to add certain python libraries of code to their own WB automatically (which seems like a very small thing to do) seems like it'd make it a fun little tool that would make you just want to explore all the different recipes / snippets that are in it. On the flip side, it also seems like a potential maintenance hassle with lots of broken / unusuable / outdated code.
So whether a 'developer's workbench' is of value, I can't really say. I think it would be, though I'm not sure what that should look like.
---
On a slightly different topic, as I've worked on this horizontal alignment tool, I've come to appreciate looking at the FreeCAD task panel (and the associated task) as a sort of miniature, single-function workbench. As I wrote the tracker classes, I started creating global state singletons to track things like mouse position, drag state, view state, and the selection state. All of this duplicates functionality that's built into FreeCAD, but the "global" singletons have a scope that's limited to the currently active task. That allows me to re-implement a customized version of these functions tailored to the specific task at hand.
So, I suppose the most useful idea I have would be to develop (or at least outline) a FreeCAD task framework in Python. Perhaps what I have in mind would be a further development for the new workbench starter kit or something...