4 ms·
I have been working to script Autodesk Fusion 360 with python recently. Programming against this environment is tough and frustrating. A couple of things I ha
by paddy_m 5y ago
I have been working to script Autodesk Fusion 360 with python recently. Programming against this environment is tough and frustrating. A couple of things I have noticed
1. Using the API is far from intuitive. There are many objects that you have to use from the API that have no named corollary in the UI. I know BReps are a thing (probably faces) but there is no way to name a face in the UI and find that via the debugger. I have to poke and prod to try to create the objects to build the things I want to.
2. Limited documentation. The APIs and object tree are documented, but examples are often limited
3. Poor programming environment. It is nice that there is a debugger mode that works with vscode, but this debugger connection frequently breaks, requiring tabbing back into fusion, restarting the debugger, tabbing back to vs-code, restarting the debugger...
4. Most examples are written by non-programmers. I have seen a couple of examples of object graph printout programs, instead of building up a list of lists or objects, these programs intertwine navigating through the tree with print indentation.
That said, I just found this repo [1] which looks well written.
On the other hand, CAD software is much more complicated than most systems I interact with. CAD platforms are one of the few remaining software systems that are written for experts. Experienced practioners are very productive [2]. So programming these systems will also be complicated.
FWIW I'm trying to template a bunch of part imports and their layouts. I'm surprised that this isn't built into the system. You can edit variables for almost (almost) every input in the system, you can name variables and elevate them to file wide variables - all without touching programming. I wish importing was parameterized such that upon import I got a chance to edit the filewide variables as parameters in the new document.
[1]https://github.com/JesusFreke/fscad/blob/master/src/fscad/fscad.py https://github.com/JesusFreke/fscad/blob/master/src/fscad/fs...
[2]https://youtu.be/G3rho-24DWQ?t=184 https://youtu.be/G3rho-24DWQ?t=184