sliptonic wrote: ↑Mon Mar 09, 2020 11:44 pm
... But that page says the changes aren't considered mature and aren't merged to upstream.
It's a bit tricky to explain.
There are already many changes done to the expression engine by realthunder. These changes are already part of the current master code as they were part of the LinkMerge branch that made it into FreeCAD. They basically allow you to use expressions in many entry fields and with many objects, which the older expression engine didn't allow.
However, in his own development branches, realthunder developed an even more advanced expression engine that is basically a subset of Python for use inside expressions. This is a major change. Since running arbitrary Python code as an expression is a significant security risk, this has not been merged; it hasn't even been submitted to FreeCAD. It is there somewhere in realthunder's repository, but not in the master code.
Development in Expression and Spreadsheet
So, can someone summarize what has actually changed about Expressions? What's still pending or likely to be merged into 0.19?
It's tricky. Realthunder explained it somewhere in his threads during the LinkMerge, but to find all information is going to be difficult.
PR #2475: Expression syntax extension
The primary issue right now is that the expressions field no longer auto-completes named Sketcher constraints. This was used by a lot of users but it doesn't currently work, so for many users this is a regression in behavior, even if internally the expression engine was "improved".
Realthunder submitted pull request
#3062 to bring that behavior back, but it has been sitting in the queue for a while now. Hopefully Werner can look at it because this feature is very missed by users.
Why doesn't the auto-completer work? I don't remember the reason exactly. I don't want to misquote realthunder, but I think the idea is that the expression engine now works on all objects of the document, therefore auto-completing the names of all objects and all their properties would produce a very long list, and would be cumbersome to display. However, this is precisely addressed with
#3062. As soon as that is merged, I think most users will get the old behavior back, and the new features of the expression engine will be easier to use.
List of pending features
Dedicated Spreadsheet Workbench Maintainer/Devs needed