use ifc_model::{Codec, EntityId, Model};
pub fn fixture() -> Model {
let path = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("../../test/fixtures/synthetic-properties/synthetic_properties.ifc");
ifc_step::StepCodec
.read_path(&path)
.expect("fixture parses")
}
#[allow(dead_code)]
pub fn wall_named(model: &Model, name: &str) -> EntityId {
*model
.ids_of_type("IFCWALL")
.iter()
.find(|id| {
model
.get(**id)
.and_then(|e| e.attributes.get(2))
.and_then(|v| v.unwrap_typed().as_text())
.map(|n| n == name)
.unwrap_or(false)
})
.expect("wall in fixture")
}