picocadrs
This is a crate for working with picoCAD project files. It supports de-/serialization of picoCAD projects and some other helpful methods and function.
Example
use OsString;
use ; // Point3D required for point macro
use point;
// Loads the file "test.txt" located in the picoCAD project folder as a model.
// This model now can access any part of that project.
// For this example test.txt is a new picoCAD project that has a single plane added without
// modifying it saved under the name "test".
let model = load.unwrap;
println!; // "Model name: test"
println!; // "Amount of meshes: 1"
let mesh = model.meshes.get.unwrap;
println!; // "Mesh name: plane"
println!; // "Mesh position: 0,0,0"
let face = mesh.faces.get.unwrap;
println!; // "Face color: 6"
println!; // "Double sided: true"
println!; // "No texture: false"
print!;
// Of course, you can change these values too.
let mut model = load.unwrap;
model.header.name = "model_name".to_string;
println!; // "Model name: model_name"
println!; // "Amount of meshes: 1"
let mesh = model.meshes.get_mut.unwrap;
mesh.name = "some_plane".to_string;
mesh.position = point!;
println!; // "Mesh name: some_plane"
println!; // "Mesh position: 1.5,-1,2"
let face = mesh.faces.get_mut.unwrap;
face.color = Lavender;
face.double_sided = false;
face.no_texture = true;
println!; // "Face color: 13"
println!; // "Double sided: false"
println!; // "No texture: true"