exp2py / part 21 query

40 views
Skip to first unread message

Christopher Horler

unread,
Dec 9, 2016, 10:34:59 AM12/9/16
to STEPcode - Developers Mailing List
Hi All,

I have been busy with my rewrite of exp2python in recent weekends. Trying to get it to a state where I can create a branch and share.

I have one query on Part 21 file format.

I have defined in my entity implementation an algorithm for detecting disjoint and overriden attributes. This appears to work correctly when tested on my simple test file, and the full AP203e2, AP214 and AP242 schemas. So, I'm reasonably happy it works...

I am also looking to define functions to aide with part 21 readers and writers, ultimately to plug into the SCL.Part21 python.

Given an attribute declared in EXPRESS in a superclass (entity A) and the same attribute in a subclass (entity B), where A also defines other attributes (not redeclared by B). If both attributes are explicit (NOT derived or inverse), what is the correct way to serialise B.

It should first be all attributes of A followed by all attributes of B?

Is there a place holder value (reiterating the attribute is not derived) for the attribute redeclared, or is the value from B.attr serialised in place of A.attr when A is output? (My current assumption)

I'm thinking I will generate a @classmethod clever enough to read the part 21 stream, but keep the class __init__ as simple as possible (which was the purpose of entirely rewriting the exp2py entity implementation, amongst other things)

Chris

Reply all
Reply to author
Forward
0 new messages