You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Query function in generated python code not handled #376
I'm currently using the python code generated by using the IFC2X3 schema and noticed that the DERIVE/WHERE statements that use the QUERY function don't appear to be converted properly into python code.
For example, IfcRelAssociatesMaterial has a where statement:
WR21 : SIZEOF(QUERY(temp <* SELF\IfcRelAssociates.RelatedObjects |
('IFC2X3.IFCFEATUREELEMENTSUBTRACTION' IN TYPEOF(temp))
OR ('IFC2X3.IFCVIRTUALELEMENT' IN TYPEOF(temp))
)) = 0;
The python code generated for this where statement is:
def wr21(self):
eval_wr21_wr = (SIZEOF(None) == 0)
if not eval_wr21_wr:
raise AssertionError('Rule wr21 violated')
else:
return eval_wr21_wr
Are there any notable features that have been changed between the last release and the HEAD?
I'm currently trying to use it to parse ifc files and any extra detail we might be able to get since the last release would be amazing if there is any.
All that's on master is near enough all that could be done without more extreme rewrites of exp2py (in my opinion). Some of the fixes were for improving output, I can't recall if the query expression was one of these.
To this end I'm starting to share some commits on another branch now. The intention of this is for a more fully featured Python implementation. In parallel I'll look for a more practical way to test it, such as a checker tool for STEP files. The initial requirement is to integrate the new lexer/parser - which I'm doing now.
Activity
cshorler commentedon Apr 19, 2018
No it's not, but many things in the exp2py implementation are not as intended. Changes will be coming soon
Enhaloed commentedon Apr 23, 2018
Thanks for the info.
Are there any notable features that have been changed between the last release and the HEAD?
I'm currently trying to use it to parse ifc files and any extra detail we might be able to get since the last release would be amazing if there is any.
Thanks again!
cshorler commentedon May 20, 2018
I've not compiled the master branch recently, I'll probably start doing that for comparison purposes soon.
There were some additional changes to exp2py on master since v0.8 (checking the git log)
https://github.com/stepcode/stepcode/commits?author=cshorler
All that's on master is near enough all that could be done without more extreme rewrites of exp2py (in my opinion). Some of the fixes were for improving output, I can't recall if the query expression was one of these.
To this end I'm starting to share some commits on another branch now. The intention of this is for a more fully featured Python implementation. In parallel I'll look for a more practical way to test it, such as a checker tool for STEP files. The initial requirement is to integrate the new lexer/parser - which I'm doing now.