-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support complex entity #189
Comments
In AP201, there exists a case where the number of subtypes of a supertype becomes 15, thus we have to generate |
This issue becomes out-dated since I learn a lot from ISO document after I created this issue. |
I have a draft implementation of complex entity instantiation on a branch of my fork alteous@c76e159. I avoided the combinatorial problem by simply having multiple entity types sharing the same ID. Would you consider this acceptable solution? I have several other fixes on the |
Consider following schema:
STEP exchange format allows complex entity like
This
#1
should be regarded as{ a: { x: 1.0, y: 2.0, z: 3.0} }
(in JSON format).We may have two way to implement this:
Define a "composed" type instead of "any" type
Option<Box<Extension>>
is used because it increases thesize_of::<AComposed>()
, although this hurts memory locality. In this casex
andy
will be placed in different memory pages, and it may cause performance issue.Generate concrete types for every combination and add them to "any" type
To keep every components continuous in memory, we can define every possible struct:
This is better in terms of memory, but the compile of generated Rust code becomes slower and slower.
The text was updated successfully, but these errors were encountered: