Welcome to the DSTV crate repository! This Rust crate is designed to parse DSTV (NC/NC1) files and visualize them as SVG (Scalable Vector Graphics). DSTV is a format extensively used in the steel industry for exchanging data about steel parts.
To install DSTV, add it to your Cargo.toml
file:
toml
[dependencies]
DSTV = "0.1.0"
Then run cargo build
to download and compile the DSTV crate along with your project.
Here's a basic example of how to use DSTV to parse a DSTV file and generate an SVG:
rust
use dstv::prelude::*;
let dstv = Dstv::from_file("./tests/data/0008-SE0009.nc1");
assert_eq!(dstv.is_ok(), true);
// Declare the dstv as mutable, as `to_svg` will reorder the elements for the
// best representation
let mut dstv = dstv.unwrap();
assert_eq!(dstv.header.order_identification, "PROJECT-1");
let svg = dstv.to_svg();
Contributions to the DSTV are welcome. If you find a bug or have a feature request, please open an issue. If you want to contribute code, please open a pull request.
This project is licensed under the MIT License.
This library is provided as-is, and while we strive for quality, we cannot guarantee that there will never be any bugs or issues.
If you have any questions or comments about DSTV, feel free to contact us.