Skip to content
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

Specification for STEP file output #13

Open
1 of 4 tasks
termoshtt opened this issue Mar 4, 2021 · 1 comment
Open
1 of 4 tasks

Specification for STEP file output #13

termoshtt opened this issue Mar 4, 2021 · 1 comment
Labels
RFC Request for comments

Comments

@termoshtt
Copy link
Contributor

termoshtt commented Mar 4, 2021

STEP file input (load) has been specified in ARCHITECTURE.md and implemented partially in ruststep::parser with later process by #12 . But, its output spec is not determined.

Duplication Elimination

For example, let us consider the entities discussed in ARCHITECTURE.md:

ENTITY a;
  x: INTEGER;
  y: INTEGER;
END_ENTITY;

ENTITY b;
  z: INTEGER;
  w: a;
END_ENTITY;

If a user has two instances of b

let b1 = B(1, A(1, 2));
let b2 = B(2, A(1, 2));

The problem here is how to eliminate the duplicated instance A(1, 2):

DATA;
#1 = A(1, 2);
#2 = B(1, @1);
#3 = B(2, @1);
ENDSEC;

We can also emit duplicated instances without elimination process, and it would be somewhat easy to implement:

DATA;
#1 = A(1, 2);
#2 = B(1, @1);
#3 = A(1, 2);
#4 = B(2, @3);
ENDSEC;

Rust API

Rust struct like

struct A {
  x: f64,
  y: f64,
}

struct B {
  z: f64,
  a: A,
}

into a STEP Record B((1.0, A((2.0, 3.0)) will be done by serde. The data mapping from Rust struct to serde data model has introduced in #18, #20, #21, and the responsibility of this issue is to implement serde::Serialize compatible for these existing implementations.

TODO

  • Implement STEP output using serde::Serialize
  • Duplication elimination
  • Update ARCHITECTURE.md
@termoshtt termoshtt self-assigned this Mar 4, 2021
@termoshtt termoshtt added the RFC Request for comments label Mar 4, 2021
@termoshtt termoshtt added this to the 0.1.0 milestone Mar 4, 2021
@termoshtt termoshtt pinned this issue Sep 16, 2021
@termoshtt
Copy link
Contributor Author

Drop from 0.1.0 milestone

@termoshtt termoshtt removed this from the 0.1.0 milestone Sep 24, 2021
@termoshtt termoshtt unpinned this issue Sep 27, 2021
@termoshtt termoshtt added this to the 0.2.0 milestone Nov 10, 2021
@termoshtt termoshtt removed this from the 0.2.0 milestone Dec 30, 2021
alteous pushed a commit to alteous/ruststep that referenced this issue May 15, 2023
全ての space で remark をパース出きるようにする

Closes ricosjp#13

See merge request ricos/truck/ruststep!22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comments
Projects
None yet
Development

No branches or pull requests

1 participant