Conversation
added 30 commits
May 15, 2023 13:22
Regenerated with:
cargo run \
--bin esprc \
schemas/APs/10303-203-aim-long.exp \
| rustfmt \
> ruststep/src/ap203.rs
This is a workaround to pass type information from esprc to ruststep-derive. The purpose is to be able to populate fields of simple types directly like this: #1 = EDGE_CURVE('NONE', ricosjp#165, #9, ricosjp#187, .T.); ^^^^^^ will be parsed with deserialize_str
The type name axis2_placement_3d was being converted to AXIS_2_PLACEMENT_3D instead of AXIS2_PLACEMENT_3D.
Consider the following example:
ENTITY base
a: STRING
END_ENTITY;
ENTITY extended
SUBTYPE OF (base);
b: STRING
END_ENTITY;
A simple instantiation of the extended entity looks like this:
#1 = EXTENDED('A', 'B')
A complex instantiation allows each subtype to be instatiated
separately like this:
#1 = (BASE('A') EXTENDED('B'))
This changes implements support for complex entity instantiation by
cherry-picking fields across all the partial entities in the list. An
complete instance of every entity in the list is then inserted into the
table. In the example above, an instance of base and an instance of
extended would be inserted into the table.
The cherry-picking process is implemented with the help of a table of
every field name for partial and complete entities.
This is yet another hack to accept derived fields of the form: ENTITY binary_numeric_expression ABSTRACT SUPERTYPE SUBTYPE OF (numeric_expression, binary_generic_expression); SELF\binary_generic_expression.operands : LIST [2:2] OF numeric_expression; END_ENTITY; We need this information in the IR; however, it doesn't fit neatly within the existing code structure.
Regenerated from slightly modified version of the official schema, version 1.43. Increased recursion limit to 512 to cope with documentation generation from the top-level directory.
The implementation required a couple of new features:
1. ToData::to_partial function
This allows the generator to choose between serializing partial and
standard entities. The following entities are equivalent:
Standard: PLANE('X', #1)
Partial: (ELEMENTARY_SURFACE('X', #1) PLANE())
2. #[holder(supertype = "type_name")] attribute
This is used by the automatically derived implementation of to_partial
to select which fields should be serialized. Partial entity fields are
serialized if they are not already defined by an existing supertype
field.
The `Insert` trait is used to insert a holder type into a table. Extra `Insert` implementations are provided for tuples for the convenience of inserting complex/partial entity instances. This is limited to five partial entity insertions for now but can be increased easily by adding more implementations in the ruststep-derive crate. The user must ensure when inserting into tables that no value is already associated with a given ID or else panic ensues.
BOUNDED_SURFACE needs to come before B_SPLINE_SURFACE. The '_' character is between the lowercase and uppercase sets, so sorting naively will produce different orderings.
Adds new lines between each partial entity.
alteous
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lets use the main branch here for our changes