GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Query function in generated python code not handled · Issue #376 · stepcode/stepcode

Query function in generated python code not handled #376

New issue
Copy link
New issue
Copy link
Open
Open
Query function in generated python code not handled#376
Copy link
Assignees
cshorler

Description

@Enhaloed
Enhaloed
opened on Apr 19, 2018
Issue body actions

Hi,

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

Is this the intended behavior?

Thanks for any responses!

Activity

  1. cshorler commented on Apr 19, 2018

    @cshorler
    cshorler
    on Apr 19, 2018
    Member
    More actions

    No it's not, but many things in the exp2py implementation are not as intended. Changes will be coming soon

  2. Enhaloed commented on Apr 23, 2018

    @Enhaloed
    Enhaloed
    on Apr 23, 2018
    Author
    More actions

    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!

  3. cshorler commented on May 20, 2018

    @cshorler
    cshorler
    on May 20, 2018
    Member
    More actions

    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.

  4. cshorler
    self-assigned this
    on May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @cshorler
    cshorler

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.