7 个版本 (重大变更)
0.5.0 | 2021年5月28日 |
---|---|
0.4.1 | 2021年5月27日 |
0.4.0 | 2021年1月31日 |
0.3.0 | 2020年10月12日 |
0.0.0 | 2020年9月4日 |
#1561 在 解析实现
用于 2 crate
350KB
2.5K SLoC
用于读取 STP/STEP CAD 文件的 Rust crate。
STEP (Standard for Echange of Product model) 是一种描述产品数据的标准,正式定义在 ISO-10303 中。
设计
模式文件是用 EXPRESS 语言编写的。我们编写一个 EXPRESS 解析器来读取模式定义,然后生成一个包含数据类型定义、特质实现和读取 stp 文件的读取器的 Rust 代码文件。
运行示例
cargo run --features=gencode --bin gencode schemas/example.exp examples/family/reader.rs
cargo run --example family
生成读取器代码
cargo run --release --features=gencode --bin gencode schemas/AP214E3_2010.exp parts/src/ap214.rs Ap214
cargo run --release --features=gencode --bin gencode schemas/AP203E2_November_2008.exp parts/src/ap203.rs Ap203
cargo build --workspace
生成点图
cargo run --release --features=gengraph --bin gengraph schemas/AP214E3_2010.exp graphs/ap214.dot
cargo run --release --features=gengraph --bin gengraph schemas/AP214E3_2010.exp graphs/curve.dot Curve
STEP 相关资源
依赖项
~3–4.5MB
~70K SLoC