recovery_probe/
recovery_probe.rs1use ifc_model::Codec;
4use ifc_step::StepCodec;
5
6fn main() {
7 let path = std::env::args().nth(1).expect("path");
8
9 match StepCodec.read_path(std::path::Path::new(&path)) {
10 Ok(_) => println!("strict: OK (unexpected)"),
11 Err(error) => println!("strict: {error}"),
12 }
13
14 let model = StepCodec::lenient()
15 .read_path(std::path::Path::new(&path))
16 .expect("lenient read");
17 println!(
18 "lenient: {} entities, complete={}, {} diagnostics",
19 model.len(),
20 model.is_complete(),
21 model.diagnostics().len()
22 );
23 for diagnostic in model.diagnostics() {
24 println!(" {diagnostic}");
25 }
26 println!(
27 "IfcRelSpaceBoundary: {}",
28 model.ids_of_type("IfcRelSpaceBoundary").len()
29 );
30 println!("schema: {:?}", model.header().schema);
31 println!("dangling refs: {}", model.dangling_references().len());
32}