From 90246cb5a1a7394bd5e61979e368164f7c923a11 Mon Sep 17 00:00:00 2001 From: BjornFidder Date: Fri, 27 Nov 2026 16:00:23 +0100 Subject: [PATCH 1/2] Map full XREF placement in Model, Paper and local blocks --- Cargo.lock | 3 +- Cargo.toml | 4 + docs/ifcx-xrefs.md | 37 +- examples/xref_placement_review.rs | 71 ++ examples/xref_review.rs | 2 +- src/ifcx/mod.rs | 8 +- src/ifcx/xref.rs | 150 ++-- tests/fixtures/annotation-blocks.ifcx | 4 +- tests/fixtures/annotation-hatch.ifcx | 4 +- tests/fixtures/annotation-workspace.ifcx | 4 +- tests/fixtures/complex-line-patterns.ifcx | 4 +- .../fixtures/dimension-fraction-diagonal.ifcx | 4 +- tests/fixtures/dimension-graphics.ifcx | 4 +- tests/fixtures/dimension-linear-aligned.ifcx | 4 +- .../dimension-spatial-references.ifcx | 4 +- tests/fixtures/font-symbol-base.ifcx | 4 +- .../fixtures/hatch-associations-disabled.ifcx | 4 +- tests/fixtures/hatch-editing.ifcx | 4 +- tests/fixtures/hatch-gradient-inactive.ifcx | 4 +- tests/fixtures/hatch-gradient.ifcx | 4 +- tests/fixtures/hatch-pattern.ifcx | 4 +- tests/fixtures/hello-cad.ifcx | 4 +- tests/fixtures/hello-nested-blocks.ifcx | 4 +- tests/fixtures/hello-paper-layouts.ifcx | 4 +- tests/fixtures/hello-viewports.ifcx | 4 +- tests/fixtures/layout-linetype-scaling.ifcx | 4 +- tests/fixtures/layout-plot-inch.ifcx | 4 +- tests/fixtures/layouts-viewports.ifcx | 4 +- tests/fixtures/text-rich.ifcx | 4 +- tests/fixtures/viewport-bulged-clip.ifcx | 4 +- tests/fixtures/workspace-state.ifcx | 4 +- tests/fixtures/xref/attachment.ifcx | 46 +- tests/fixtures/xref/paper-layouts.ifcx | 787 ++++++++++++++++++ tests/ifcx_xref_placement.rs | 255 ++++++ tests/ifcx_xref_reference_types.rs | 39 +- tests/ifcx_xref_source_formats.rs | 38 +- tests/ifcx_xrefs.rs | 57 +- tests/support/xref_placement.rs | 84 ++ 38 files changed, 1447 insertions(+), 230 deletions(-) create mode 100644 examples/xref_placement_review.rs create mode 100644 tests/fixtures/xref/paper-layouts.ifcx create mode 100644 tests/ifcx_xref_placement.rs create mode 100644 tests/support/xref_placement.rs diff --git a/Cargo.lock b/Cargo.lock index 83bb13a..9f6731a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -449,8 +449,7 @@ dependencies = [ [[package]] name = "ifccad" -version = "2026.47.0" -source = "git+https://github.com/OpenAEC-Foundation/ifccad.git?rev=785590abb669c38afb700b339d36cc8cc0c18161#785590abb669c38afb700b339d36cc8cc0c18161" +version = "2026.48.0" dependencies = [ "base64", "fpmath", diff --git a/Cargo.toml b/Cargo.toml index a91eaa7..1a584f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,3 +50,7 @@ required-features = ["ifcx"] [[example]] name = "leaders_gallery" required-features = ["ifcx"] + +[[example]] +name = "xref_placement_review" +required-features = ["ifcx", "mline-pilot"] diff --git a/docs/ifcx-xrefs.md b/docs/ifcx-xrefs.md index 86be455..6c2019d 100644 --- a/docs/ifcx-xrefs.md +++ b/docs/ifcx-xrefs.md @@ -1,6 +1,6 @@ -# External sources and Model XREF attachments +# External sources and XREF placements -The development mapping pairs with IFCCAD profile 0.12.0 / CBOR 12. The core +The development mapping pairs with IFCCAD profile 0.13.0 / CBOR 13. The core owns native source/location validation. Document maps DWG XREF definitions to drawing-local external sources and INSERTs to native XREF placements. `import_ifccad_preserving` and `export_ifccad_preserving` retain native source @@ -8,12 +8,21 @@ and entity IDs, original URI spelling and optional expected FingerprintGUID. Context history retains earlier authored locators for undo after a native save. Resolving a file at another location does not implicitly rewrite its locator. -Supported placements are Model attachments with Z rotation and positive uniform -effective scale. The scale already includes any insertion-unit conversion. -Neither direction multiplies the unit factor again. Source base points belong -to the external source; placement is stored once as O/X/Y. Unknown offline -source units remain absent. A source definition without an INSERT is retained. -Loaded external bodies are not emitted as native blocks or Model entities. +Supported placements use the shared block transform: an orthonormal owner +frame, rotation in radians and finite nonzero signed XYZ effective scale. +Model, Paper layouts and local blocks may own XREFs. Scale includes insertion +unit conversion once. INSERT coordinates use CAD OCS; native O belongs to the +owner frame. Frame angle and explicit rotation combine once. Source base +points belong to the external source and are subtracted once by the host. +Source Model alone is loaded even for Paper owners. Unknown units stay absent. +A definition without an INSERT is retained. Loaded external bodies and their +dependent blocks are not emitted as authored native geometry. + +Attach and Overlay can share one native source ID. CAD requires distinct block +records for the two relationship types; context retains their shared source ID +when saving native files. A standalone CAD roundtrip has distinct source IDs for +those definitions: path/GUID equality never silently merges authored identities. +FileDepList identity is emitted once per source, with a count across all owners. The pure location helpers distinguish a direct URI-reference from a search filename. Relative CAD paths map to escaped relative URI-references; drive @@ -45,9 +54,9 @@ separate qualification. Extra physical dependency metadata and unbound records produce native conversion loss diagnostics; the first native source model retains only the qualified expected FingerprintGUID. -Overlay, arrays, Paper ownership, XREF inside a local block, nonuniform or -reflected scaling and INSERT attributes produce explicit conversion losses. -Native core validation enforces the same placement/ownership boundary. -Nested reference graphs, binding, packaging, remote download and additional -source formats remain outside this slice. The core stays independent of CAD -runtimes; Document owns CAD conversion, and the host owns resolution and I/O. +Arrays and INSERT attributes remain explicit conversion losses. Nesting and +cycles retain the existing host-owned graph behavior. Binding, packaging, +remote download and additional source formats are outside this slice. The core +stays independent of CAD runtimes; Document owns CAD conversion and the host +owns resolution and IO. This is an unpublished native13 draft with an explicit +local IFCCAD patch, pending native staging and final downstream pins. diff --git a/examples/xref_placement_review.rs b/examples/xref_placement_review.rs new file mode 100644 index 0000000..ad71263 --- /dev/null +++ b/examples/xref_placement_review.rs @@ -0,0 +1,71 @@ +//! Compact slice-A review files, read back through production readers. +use opencaddocument::{ifccad::*, *}; +#[path = "../tests/support/xref_placement.rs"] +mod support; +fn main() -> std::result::Result<(), Box> { + let root = std::path::PathBuf::from( + std::env::args_os() + .nth(1) + .ok_or("output directory required")?, + ); + std::fs::create_dir_all(root.join("Refs"))?; + let mut drawing = support::mixed_owners(); + drawing.external_sources[0].location = IfccadExternalSourceLocation::UriReference { + uri: "Refs/Detail.dwg".into(), + }; + let mut source = Document::new(); + source.header.insertion_units = 6; + source.header.model_space_insertion_base = Vector3::new(10., 20., 0.); + source.header.fingerprint_guid = "{E5B4A9AF-CF20-4FC9-A30F-FFB20FD987E1}".into(); + source.add_entity(EntityType::Line(entities::Line::from_coords( + 10., 20., 0., 12., 20., 0., + )))?; + source.add_entity(EntityType::Circle(entities::Circle::from_center_radius( + Vector3::new(11., 21., 0.), + 0.5, + )))?; + let mut text = entities::Text::new(); + text.value = "XREF".into(); + text.insertion_point = Vector3::new(10., 22., 0.); + text.height = 0.5; + source.add_entity(EntityType::Text(text))?; + for (name, format) in [ + ("Detail.dwg", &Dwg as &dyn Format), + ("Detail.dxf", &Dxf as &dyn Format), + ] { + let (bytes, losses) = format.write(&source)?; + assert!(losses.is_empty(), "{losses:?}"); + format.read(&bytes)?; + std::fs::write(root.join("Refs").join(name), bytes)?; + } + let native = Ifcx.export_ifccad(&source)?.drawing; + let json = encode_ifccad_document(&native)?; + load_ifccad_bytes(json.bytes(), Default::default())?; + std::fs::write(root.join("Refs/Detail.ifccad"), json.bytes())?; + for (name, binary) in [("Gallery.ifccad", false), ("Gallery.cbor", true)] { + let bytes = if binary { + encode_ifccad_cbor_document(&drawing)?.bytes().to_vec() + } else { + encode_ifccad_document(&drawing)?.bytes().to_vec() + }; + if binary { + load_ifccad_cbor_bytes(&bytes, Default::default())?; + } else { + load_ifccad_bytes(&bytes, Default::default())?; + } + std::fs::write(root.join(name), bytes)?; + } + let imported = Ifcx.import_ifccad(&drawing)?; + for (name, format) in [ + ("Gallery.dwg", &Dwg as &dyn Format), + ("Gallery.dxf", &Dxf as &dyn Format), + ] { + let (bytes, losses) = format.write(&imported.document)?; + assert!(losses.is_empty(), "{losses:?}"); + let (cad, _) = format.read(&bytes)?; + validate_ifccad_document(&Ifcx.export_ifccad(&cad)?.drawing)?; + std::fs::write(root.join(name), bytes)?; + } + println!("Review files: {}", root.display()); + Ok(()) +} diff --git a/examples/xref_review.rs b/examples/xref_review.rs index 9d50452..dfbdb6f 100644 --- a/examples/xref_review.rs +++ b/examples/xref_review.rs @@ -128,7 +128,7 @@ fn main() -> std::result::Result<(), Error> { unreachable!() }; xref.source_id = definition.id; - xref.placement.origin[0] += index as f64 * 2000.; + xref.transform.placement.origin[0] += index as f64 * 2000.; gallery.external_sources.push(definition); gallery.model.entities.push(entity); } diff --git a/src/ifcx/mod.rs b/src/ifcx/mod.rs index 4bb6954..c63420c 100644 --- a/src/ifcx/mod.rs +++ b/src/ifcx/mod.rs @@ -84,7 +84,7 @@ const TEMPLATE: &str = r#"{ "author": "OpenCAD", "timestamp": "1970-01-01T00:00:00Z" }, - "imports": [{ "uri": "urn:example:ifccad:0.12.0" }], + "imports": [{ "uri": "urn:example:ifccad:0.13.0" }], "schemas": {}, "data": [ { @@ -103,7 +103,7 @@ const TEMPLATE: &str = r#"{ "nextLayoutId": 2, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1 } @@ -749,7 +749,7 @@ fn add_in( return Ok(None); }; let converted = match &entity.kind { - IfccadEntityKind::Xref(source) => xref::insert_in(source, names), + IfccadEntityKind::Xref(source) => xref::insert_in(source, names, losses), IfccadEntityKind::Dimension(source) => { dimension::dimension_in(source, document, names, losses) } @@ -1497,7 +1497,7 @@ impl Losses { fn entity_in(kind: &IfccadEntityKind, names: &Names, losses: &mut Losses) -> Option { Some(match kind { - IfccadEntityKind::Xref(source) => return xref::insert_in(source, names), + IfccadEntityKind::Xref(source) => return xref::insert_in(source, names, losses), IfccadEntityKind::AttributeDefinition(a) => { return attributes::definition_in(a, names, losses) } diff --git a/src/ifcx/xref.rs b/src/ifcx/xref.rs index 3dc05ff..63ef1d8 100644 --- a/src/ifcx/xref.rs +++ b/src/ifcx/xref.rs @@ -5,35 +5,49 @@ use ifccad::{ IfccadXrefReferenceType, }; +fn native_entities(drawing: &IfccadDocument) -> impl Iterator { + drawing + .model + .entities + .iter() + .chain(drawing.paper_layouts.iter().flat_map(|p| &p.entities)) + .chain(drawing.blocks.iter().flat_map(|b| &b.entities)) +} + pub(super) fn diagnose_dependency_losses(writer: &mut Writer<'_>) { for dependency in &writer.document.file_dependencies { - let binding = writer.document.block_records.iter().find(|record| { - if !writer.external_sources.contains_key(&record.handle) - || !dependency.feature.eq_ignore_ascii_case("Acad:XRef") - { - return false; - } - let matches = dependency - .file_name - .replace('\\', "/") - .eq_ignore_ascii_case(&record.xref_path.replace('\\', "/")); - #[cfg(feature = "mline-pilot")] - let matches = matches - || writer - .roundtrip - .and_then(|context| context.external_source(record.handle)) - .is_some_and(|source| { - external_sources::external_source_location_to_cad_path(&source.location) - .is_ok_and(|path| { - dependency - .file_name - .replace('\\', "/") - .eq_ignore_ascii_case(&path.replace('\\', "/")) - }) - }); - matches - }); - let Some(binding) = binding else { + let bindings: Vec<_> = writer + .document + .block_records + .iter() + .filter(|record| { + if !writer.external_sources.contains_key(&record.handle) + || !dependency.feature.eq_ignore_ascii_case("Acad:XRef") + { + return false; + } + let matches = dependency + .file_name + .replace('\\', "/") + .eq_ignore_ascii_case(&record.xref_path.replace('\\', "/")); + #[cfg(feature = "mline-pilot")] + let matches = matches + || writer + .roundtrip + .and_then(|context| context.external_source(record.handle)) + .is_some_and(|source| { + external_sources::external_source_location_to_cad_path(&source.location) + .is_ok_and(|path| { + dependency + .file_name + .replace('\\', "/") + .eq_ignore_ascii_case(&path.replace('\\', "/")) + }) + }); + matches + }) + .collect(); + let Some(binding) = bindings.first() else { writer.losses.note(format!( "unbound FileDepList record {}: {}", dependency.feature, dependency.file_name @@ -59,13 +73,9 @@ pub(super) fn diagnose_dependency_losses(writer: &mut Writer<'_>) { dependency.file_name )); } - let references = writer - .drawing - .model - .entities - .iter() + let references = native_entities(&writer.drawing) .filter_map(IfccadEntity::as_native) - .filter(|e| matches!(&e.kind, IfccadEntityKind::Xref(x) if x.source_id == source_id)) + .filter(|e| matches!(&e.kind, IfccadEntityKind::Xref(x) if bindings.iter().any(|r| writer.external_sources[&r.handle] == x.source_id))) .count(); if dependency .fingerprint_guid @@ -128,10 +138,7 @@ pub(super) fn sources_in( } } }; - let mut types: Vec<_> = drawing - .model - .entities - .iter() + let mut types: Vec<_> = native_entities(drawing) .filter_map(IfccadEntity::as_native) .filter_map(|e| match &e.kind { IfccadEntityKind::Xref(x) if x.source_id == source.id => Some(x.reference_type), @@ -184,8 +191,9 @@ pub(super) fn sources_in( document.block_records.add(record)?; document.add_entity(EntityType::Block(block))?; document.add_entity(EntityType::BlockEnd(end))?; - if let Some(guid) = source.source.fingerprint_guid() { - document + } + if let Some(guid) = source.source.fingerprint_guid() { + document .file_dependencies .push(acadrust::document::FileDependency { feature: "Acad:XRef".into(), @@ -196,10 +204,7 @@ pub(super) fn sources_in( timestamp: 0, file_size: 0, affects_graphics: true, - reference_count: drawing - .model - .entities - .iter() + reference_count: native_entities(drawing) .filter_map(IfccadEntity::as_native) .filter( |e| matches!(&e.kind,IfccadEntityKind::Xref(x) if x.source_id==source.id), @@ -207,24 +212,34 @@ pub(super) fn sources_in( .count() .try_into()?, }); - } } } Ok(()) } -pub(super) fn insert_in(xref: &IfccadXref, names: &Names) -> Option { +pub(super) fn insert_in( + xref: &IfccadXref, + names: &Names, + losses: &mut Losses, +) -> Option { let name = names .external_sources .get(&(xref.source_id, xref.reference_type))?; - let (origin, normal, rotation) = placement_in(&xref.placement); + let (origin, normal, frame) = placement_in(&xref.transform.placement); let mut insert = Insert::new(name.clone(), origin); insert.normal = normal; - insert.rotation = rotation; - insert.set_x_scale(xref.scale); - insert.set_y_scale(xref.scale); - insert.set_z_scale(xref.scale); - (insert.x_scale().to_bits() == xref.scale.to_bits()).then_some(EntityType::Insert(insert)) + insert.rotation = frame + xref.transform.rotation; + let [x, y, z] = xref.transform.scale; + insert.set_x_scale(x); + insert.set_y_scale(y); + insert.set_z_scale(z); + if [insert.x_scale(), insert.y_scale(), insert.z_scale()].map(f64::to_bits) + != xref.transform.scale.map(f64::to_bits) + { + losses.note("XREF scale cannot be represented by CAD INSERT setters"); + return None; + } + Some(EntityType::Insert(insert)) } impl Writer<'_> { @@ -307,37 +322,30 @@ impl Writer<'_> { insert: &Insert, record: &BlockRecord, ) -> Result, Error> { - let owner = insert.common.owner_handle; - let model = owner.is_null() - || self - .document - .block_records - .iter() - .any(|b| b.handle == owner && b.is_model_space()); let scales = [insert.x_scale(), insert.y_scale(), insert.z_scale()]; - let placement = placement_out(insert.insert_point, insert.normal, insert.rotation); - if !model - || insert.row_count != 1 + let normal = [insert.normal.x, insert.normal.y, insert.normal.z]; + if insert.row_count != 1 || insert.column_count != 1 || !insert.attributes.is_empty() - || !scales[0].is_finite() - || scales[0] <= 0. - || scales.iter().any(|s| *s != scales[0]) - || placement.x_axis[2].abs() > 1e-12 - || placement.y_axis[2].abs() > 1e-12 - || placement.x_axis[0] * placement.y_axis[1] - placement.x_axis[1] * placement.y_axis[0] - <= 0. + || scales.iter().any(|v| !v.is_finite() || *v == 0.) + || normal.iter().any(|v| !v.is_finite()) + || normal.iter().all(|v| *v == 0.) + || !insert.rotation.is_finite() { - self.losses.note(format!("XREF {} requires Model ownership, one attachment, no attributes, Z rotation and positive uniform scale",record.name)); + self.losses.note(format!("XREF {} requires one INSERT without attributes, finite rotation/normal and finite nonzero XYZ scale",record.name)); return Ok(None); } + let placement = placement_out(insert.insert_point, insert.normal, 0.); let Some(source_id) = self.external_source(record)? else { return Ok(None); }; Ok(Some(IfccadEntityKind::Xref(IfccadXref { source_id, - placement, - scale: scales[0], + transform: IfccadBlockTransform { + placement, + rotation: insert.rotation, + scale: scales, + }, reference_type: if record.flags.is_xref_overlay { IfccadXrefReferenceType::Overlay } else { diff --git a/tests/fixtures/annotation-blocks.ifcx b/tests/fixtures/annotation-blocks.ifcx index 9ecf127..879fcc1 100644 --- a/tests/fixtures/annotation-blocks.ifcx +++ b/tests/fixtures/annotation-blocks.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -33,7 +33,7 @@ "nextLayoutId": 2, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/annotation-hatch.ifcx b/tests/fixtures/annotation-hatch.ifcx index 0326006..3f13a9a 100644 --- a/tests/fixtures/annotation-hatch.ifcx +++ b/tests/fixtures/annotation-hatch.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -35,7 +35,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 2 } } diff --git a/tests/fixtures/annotation-workspace.ifcx b/tests/fixtures/annotation-workspace.ifcx index 0e99fb3..b19f45b 100644 --- a/tests/fixtures/annotation-workspace.ifcx +++ b/tests/fixtures/annotation-workspace.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -39,7 +39,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 9007199254740994, "nextUcsId": 9007199254740994, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 }, "ifccad::drawingWorkspace": { diff --git a/tests/fixtures/complex-line-patterns.ifcx b/tests/fixtures/complex-line-patterns.ifcx index 8b2fffd..6df3e7b 100644 --- a/tests/fixtures/complex-line-patterns.ifcx +++ b/tests/fixtures/complex-line-patterns.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -44,7 +44,7 @@ "nextSymbolSourceId": 4, "nextTextStyleId": 2, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 } } diff --git a/tests/fixtures/dimension-fraction-diagonal.ifcx b/tests/fixtures/dimension-fraction-diagonal.ifcx index 51885a1..6f63fa1 100644 --- a/tests/fixtures/dimension-fraction-diagonal.ifcx +++ b/tests/fixtures/dimension-fraction-diagonal.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -37,7 +37,7 @@ "nextModelWindowId": 1, "nextTextStyleId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextSymbolSourceId": 1, "nextAnnotationScaleId": 1 } diff --git a/tests/fixtures/dimension-graphics.ifcx b/tests/fixtures/dimension-graphics.ifcx index c13f037..9fd3df4 100644 --- a/tests/fixtures/dimension-graphics.ifcx +++ b/tests/fixtures/dimension-graphics.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -37,7 +37,7 @@ "nextModelWindowId": 1, "nextTextStyleId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextSymbolSourceId": 1, "nextAnnotationScaleId": 1 } diff --git a/tests/fixtures/dimension-linear-aligned.ifcx b/tests/fixtures/dimension-linear-aligned.ifcx index 7224f04..fd56213 100644 --- a/tests/fixtures/dimension-linear-aligned.ifcx +++ b/tests/fixtures/dimension-linear-aligned.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -37,7 +37,7 @@ "nextModelWindowId": 1, "nextTextStyleId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextSymbolSourceId": 1, "nextAnnotationScaleId": 1 } diff --git a/tests/fixtures/dimension-spatial-references.ifcx b/tests/fixtures/dimension-spatial-references.ifcx index d885f96..29358fd 100644 --- a/tests/fixtures/dimension-spatial-references.ifcx +++ b/tests/fixtures/dimension-spatial-references.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -37,7 +37,7 @@ "nextModelWindowId": 1, "nextTextStyleId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextSymbolSourceId": 1, "nextAnnotationScaleId": 1 } diff --git a/tests/fixtures/font-symbol-base.ifcx b/tests/fixtures/font-symbol-base.ifcx index 47100df..317a974 100644 --- a/tests/fixtures/font-symbol-base.ifcx +++ b/tests/fixtures/font-symbol-base.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -32,7 +32,7 @@ "nextLayoutId": 2, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/hatch-associations-disabled.ifcx b/tests/fixtures/hatch-associations-disabled.ifcx index 62e687a..121f2ad 100644 --- a/tests/fixtures/hatch-associations-disabled.ifcx +++ b/tests/fixtures/hatch-associations-disabled.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -34,7 +34,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 } } diff --git a/tests/fixtures/hatch-editing.ifcx b/tests/fixtures/hatch-editing.ifcx index 8375a7d..c9dc002 100644 --- a/tests/fixtures/hatch-editing.ifcx +++ b/tests/fixtures/hatch-editing.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -34,7 +34,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 } } diff --git a/tests/fixtures/hatch-gradient-inactive.ifcx b/tests/fixtures/hatch-gradient-inactive.ifcx index 4cad5bf..b3b7d10 100644 --- a/tests/fixtures/hatch-gradient-inactive.ifcx +++ b/tests/fixtures/hatch-gradient-inactive.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -33,7 +33,7 @@ "nextLinePatternId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextSymbolSourceId": 1, "nextAnnotationScaleId": 1 } diff --git a/tests/fixtures/hatch-gradient.ifcx b/tests/fixtures/hatch-gradient.ifcx index 3355e70..049e7ac 100644 --- a/tests/fixtures/hatch-gradient.ifcx +++ b/tests/fixtures/hatch-gradient.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -33,7 +33,7 @@ "nextLinePatternId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextSymbolSourceId": 1, "nextAnnotationScaleId": 1 } diff --git a/tests/fixtures/hatch-pattern.ifcx b/tests/fixtures/hatch-pattern.ifcx index 770530d..3bd258b 100644 --- a/tests/fixtures/hatch-pattern.ifcx +++ b/tests/fixtures/hatch-pattern.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -34,7 +34,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 } } diff --git a/tests/fixtures/hello-cad.ifcx b/tests/fixtures/hello-cad.ifcx index 47100df..317a974 100644 --- a/tests/fixtures/hello-cad.ifcx +++ b/tests/fixtures/hello-cad.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -32,7 +32,7 @@ "nextLayoutId": 2, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/hello-nested-blocks.ifcx b/tests/fixtures/hello-nested-blocks.ifcx index 9ecf127..879fcc1 100644 --- a/tests/fixtures/hello-nested-blocks.ifcx +++ b/tests/fixtures/hello-nested-blocks.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -33,7 +33,7 @@ "nextLayoutId": 2, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/hello-paper-layouts.ifcx b/tests/fixtures/hello-paper-layouts.ifcx index 47accef..828e27f 100644 --- a/tests/fixtures/hello-paper-layouts.ifcx +++ b/tests/fixtures/hello-paper-layouts.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -35,7 +35,7 @@ "nextLayoutId": 4, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/hello-viewports.ifcx b/tests/fixtures/hello-viewports.ifcx index eb00b60..991eea7 100644 --- a/tests/fixtures/hello-viewports.ifcx +++ b/tests/fixtures/hello-viewports.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -32,7 +32,7 @@ "nextLayoutId": 3, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/layout-linetype-scaling.ifcx b/tests/fixtures/layout-linetype-scaling.ifcx index 97de9db..77d27f9 100644 --- a/tests/fixtures/layout-linetype-scaling.ifcx +++ b/tests/fixtures/layout-linetype-scaling.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -27,7 +27,7 @@ "attributes": { "ifccad::drawing": { "lengthUnit": "cm", - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextEntityId": 101, "nextLayerId": 3, "nextLayoutId": 3, diff --git a/tests/fixtures/layout-plot-inch.ifcx b/tests/fixtures/layout-plot-inch.ifcx index 0c41b88..5ec1edb 100644 --- a/tests/fixtures/layout-plot-inch.ifcx +++ b/tests/fixtures/layout-plot-inch.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -27,7 +27,7 @@ "attributes": { "ifccad::drawing": { "lengthUnit": "cm", - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextEntityId": 101, "nextLayerId": 3, "nextLayoutId": 3, diff --git a/tests/fixtures/layouts-viewports.ifcx b/tests/fixtures/layouts-viewports.ifcx index 0efa990..617e014 100644 --- a/tests/fixtures/layouts-viewports.ifcx +++ b/tests/fixtures/layouts-viewports.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -38,7 +38,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 1, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 } } diff --git a/tests/fixtures/text-rich.ifcx b/tests/fixtures/text-rich.ifcx index 7e6e28c..f6c147d 100644 --- a/tests/fixtures/text-rich.ifcx +++ b/tests/fixtures/text-rich.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -36,7 +36,7 @@ "nextModelWindowId": 1, "nextTextStyleId": 2, "nextUcsId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 } } diff --git a/tests/fixtures/viewport-bulged-clip.ifcx b/tests/fixtures/viewport-bulged-clip.ifcx index 5059e3e..f4b8abd 100644 --- a/tests/fixtures/viewport-bulged-clip.ifcx +++ b/tests/fixtures/viewport-bulged-clip.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -32,7 +32,7 @@ "nextLayoutId": 43, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1 diff --git a/tests/fixtures/workspace-state.ifcx b/tests/fixtures/workspace-state.ifcx index 74cead9..28f3933 100644 --- a/tests/fixtures/workspace-state.ifcx +++ b/tests/fixtures/workspace-state.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -39,7 +39,7 @@ "nextSymbolSourceId": 1, "nextModelWindowId": 9007199254740994, "nextUcsId": 9007199254740994, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextAnnotationScaleId": 1 }, "ifccad::drawingWorkspace": { diff --git a/tests/fixtures/xref/attachment.ifcx b/tests/fixtures/xref/attachment.ifcx index ef335de..033a1a4 100644 --- a/tests/fixtures/xref/attachment.ifcx +++ b/tests/fixtures/xref/attachment.ifcx @@ -8,7 +8,7 @@ }, "imports": [ { - "uri": "urn:example:ifccad:0.12.0" + "uri": "urn:example:ifccad:0.13.0" } ], "schemas": {}, @@ -33,7 +33,7 @@ "nextLayoutId": 43, "nextLinePatternId": 1, "nextSymbolSourceId": 1, - "profileVersion": "0.12.0", + "profileVersion": "0.13.0", "nextUcsId": 1, "nextModelWindowId": 1, "nextAnnotationScaleId": 1, @@ -138,26 +138,32 @@ "layer": "/cad/d1/layer/0", "linePatternScale": 1.0 }, - "ifccad::geom::placement": { - "origin": [ - 10000.0, - 5000.0, - 0.0 - ], - "xAxis": [ - 0.0, - 1.0, - 0.0 - ], - "yAxis": [ - -1.0, - 0.0, - 0.0 - ] - }, "ifccad::xref": { "source": "/cad/d1/externalSource/1", - "scale": 500.0 + "transform": { + "placement": { + "origin": [ + 10000.0, + 5000.0, + 0.0 + ], + "xAxis": [ + 0.0, + 1.0, + 0.0 + ], + "yAxis": [ + -1.0, + 0.0, + 0.0 + ] + }, + "scale": [ + 500.0, + 500.0, + 500.0 + ] + } } } }, diff --git a/tests/fixtures/xref/paper-layouts.ifcx b/tests/fixtures/xref/paper-layouts.ifcx new file mode 100644 index 0000000..828e27f --- /dev/null +++ b/tests/fixtures/xref/paper-layouts.ifcx @@ -0,0 +1,787 @@ +{ + "header": { + "id": "ifccad-experimental-hello", + "ifcxVersion": "ifcx_alpha", + "dataVersion": "0.1.0", + "author": "OpenAEC", + "timestamp": "2026-09-29T00:00:00Z" + }, + "imports": [ + { + "uri": "urn:example:ifccad:0.13.0" + } + ], + "schemas": {}, + "data": [ + { + "path": "/cad/d1", + "children": { + "block1": "/cad/d1/block/1", + "block2": "/cad/d1/block/2", + "layer0": "/cad/d1/layer/0", + "layer1": "/cad/d1/layer/1", + "layer2": "/cad/d1/layer/2", + "linePattern0": "/cad/d1/linePattern/0", + "model": "/cad/d1/layout/1", + "paper2": "/cad/d1/layout/2", + "paper3": "/cad/d1/layout/3" + }, + "attributes": { + "ifccad::drawing": { + "lengthUnit": "cm", + "nextBlockId": 3, + "nextEntityId": 12, + "nextLayerId": 3, + "nextLayoutId": 4, + "nextLinePatternId": 1, + "nextSymbolSourceId": 1, + "profileVersion": "0.13.0", + "nextUcsId": 1, + "nextModelWindowId": 1, + "nextAnnotationScaleId": 1 + } + } + }, + { + "path": "/cad/d1/linePattern/0", + "attributes": { + "ifccad::linePattern": { + "name": "Continuous", + "pattern": [] + } + } + }, + { + "path": "/cad/d1/layout/1", + "children": { + "0": "/cad/d1/e1", + "1": "/cad/d1/e2", + "2": "/cad/d1/e3", + "3": "/cad/d1/e4", + "4": "/cad/d1/e5" + }, + "attributes": { + "ifccad::layout": { + "kind": "Model", + "tabIndex": 0 + } + } + }, + { + "path": "/cad/d1/layout/2", + "children": { + "0": "/cad/d1/e6", + "1": "/cad/d1/e7" + }, + "attributes": { + "ifccad::layout": { + "kind": "Paper", + "media": { + "height": 420.0, + "unit": "mm", + "width": 297.0 + }, + "name": "A3", + "plotSettings": { + "area": { + "mode": "Layout" + }, + "mapping": { + "placement": { + "mode": "Offset", + "reference": "Media", + "x": 0, + "y": 0 + }, + "scale": { + "mode": "Fixed", + "outputLength": 1.0, + "scopeLength": 1 + } + }, + "options": { + "hidePaperSpaceObjects": false, + "plotLineWeights": false, + "plotPaperSpaceLast": false, + "plotTransparency": false, + "plotViewportBorders": false, + "scaleLineWeights": false + }, + "output": { + "applyPlotStyles": false, + "shadedPlot": { + "mode": "AsDisplayed", + "quality": { + "mode": "Normal" + } + } + }, + "page": { + "printableArea": { + "maxX": 297.0, + "maxY": 420.0, + "minX": 0, + "minY": 0 + }, + "rotation": "none" + }, + "plotUnit": "mm" + }, + "tabIndex": 1 + } + } + }, + { + "path": "/cad/d1/layout/3", + "children": { + "0": "/cad/d1/e8" + }, + "attributes": { + "ifccad::layout": { + "kind": "Paper", + "media": { + "height": 11.0, + "unit": "in", + "width": 8.5 + }, + "name": "Letter", + "plotSettings": { + "area": { + "mode": "Layout" + }, + "mapping": { + "placement": { + "mode": "Offset", + "reference": "Media", + "x": 0, + "y": 0 + }, + "scale": { + "mode": "Fixed", + "outputLength": 1.0, + "scopeLength": 1 + } + }, + "options": { + "hidePaperSpaceObjects": false, + "plotLineWeights": false, + "plotPaperSpaceLast": false, + "plotTransparency": false, + "plotViewportBorders": false, + "scaleLineWeights": false + }, + "output": { + "applyPlotStyles": false, + "shadedPlot": { + "mode": "AsDisplayed", + "quality": { + "mode": "Normal" + } + } + }, + "page": { + "printableArea": { + "maxX": 8.5, + "maxY": 11.0, + "minX": 0, + "minY": 0 + }, + "rotation": "none" + }, + "plotUnit": "in" + }, + "tabIndex": 2 + } + } + }, + { + "path": "/cad/d1/layer/0", + "attributes": { + "ifccad::layer": { + "appearance": { + "color": { + "kind": "Foreground" + }, + "linePattern": "/cad/d1/linePattern/0", + "lineWeight": 0.1, + "opacity": 1.0 + }, + "name": "0" + } + } + }, + { + "path": "/cad/d1/layer/1", + "attributes": { + "ifccad::layer": { + "appearance": { + "color": { + "rgb": [ + 0, + 255, + 0 + ] + }, + "linePattern": "/cad/d1/linePattern/0", + "lineWeight": 0.25, + "opacity": 0.8 + }, + "name": "Construction" + } + } + }, + { + "path": "/cad/d1/layer/2", + "attributes": { + "ifccad::layer": { + "appearance": { + "color": { + "rgb": [ + 255, + 0, + 0 + ] + }, + "linePattern": "/cad/d1/linePattern/0", + "lineWeight": 0.35, + "opacity": 1.0 + }, + "name": "Symbols" + } + } + }, + { + "path": "/cad/d1/block/1", + "children": { + "0": "/cad/d1/e9" + }, + "attributes": { + "ifccad::blockDefinition": { + "basePoint": [ + 2.0, + 0.0, + 0.0 + ], + "insertionUnit": "cm", + "name": "Marker" + } + } + }, + { + "path": "/cad/d1/block/2", + "children": { + "0": "/cad/d1/e10", + "1": "/cad/d1/e11" + }, + "attributes": { + "ifccad::blockDefinition": { + "basePoint": [ + 0.0, + 0.0, + 0.0 + ], + "insertionUnit": "mm", + "name": "Nested marker" + } + } + }, + { + "path": "/cad/d1/e1", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByLayer" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/1" + }, + "ifccad::geom::lineSegment": { + "end": [ + 50.0, + 0.0, + 0.0 + ], + "start": [ + 0.0, + 0.0, + 0.0 + ] + } + } + }, + { + "path": "/cad/d1/e2", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByLayer" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/1" + }, + "ifccad::geom::placement": { + "origin": [ + 10.0, + 2.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + }, + "ifccad::geom::planarPolyline": { + "closed": false, + "vertices": [ + [ + 0.0, + 0.0 + ], + [ + 2.0, + 0.0 + ], + [ + 2.0, + 3.0 + ] + ] + } + } + }, + { + "path": "/cad/d1/e3", + "attributes": { + "ifccad::blockInstance": { + "definition": "/cad/d1/block/2", + "transform": { + "placement": { + "origin": [ + 20.0, + 0.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + }, + "rotation": 0.25, + "scale": [ + 2.0, + 1.0, + 1.0 + ] + } + }, + "ifccad::entity": { + "appearance": { + "color": { + "mode": "Explicit", + "value": { + "rgb": [ + 0, + 0, + 255 + ] + } + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/2" + } + } + }, + { + "path": "/cad/d1/e4", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByLayer" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/2" + }, + "ifccad::geom::circle": { + "radius": 3.0 + }, + "ifccad::geom::placement": { + "origin": [ + 10.0, + 2.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + } + } + }, + { + "path": "/cad/d1/e5", + "attributes": { + "ifccad::blockInstance": { + "definition": "/cad/d1/block/2", + "transform": { + "placement": { + "origin": [ + 40.0, + 0.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + }, + "rotation": 0.25, + "scale": [ + 2.0, + 1.0, + 1.0 + ] + } + }, + "ifccad::entity": { + "appearance": { + "color": { + "mode": "Explicit", + "value": { + "rgb": [ + 255, + 255, + 0 + ] + } + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/2" + } + } + }, + { + "path": "/cad/d1/e6", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByLayer" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/1" + }, + "ifccad::geom::lineSegment": { + "end": [ + 287.0, + 10.0, + 0.0 + ], + "start": [ + 10.0, + 10.0, + 0.0 + ] + } + } + }, + { + "path": "/cad/d1/e7", + "attributes": { + "ifccad::blockInstance": { + "definition": "/cad/d1/block/2", + "transform": { + "placement": { + "origin": [ + 20.0, + 20.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + }, + "rotation": 0.0, + "scale": [ + 10.0, + 10.0, + 10.0 + ] + } + }, + "ifccad::entity": { + "appearance": { + "color": { + "mode": "Explicit", + "value": { + "rgb": [ + 255, + 0, + 255 + ] + } + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/2" + } + } + }, + { + "path": "/cad/d1/e8", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByLayer" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/1" + }, + "ifccad::geom::circle": { + "radius": 0.5 + }, + "ifccad::geom::placement": { + "origin": [ + 1.0, + 1.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + } + } + }, + { + "path": "/cad/d1/e9", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByBlock" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/0" + }, + "ifccad::geom::lineSegment": { + "end": [ + 4.0, + 0.0, + 0.0 + ], + "start": [ + 2.0, + 0.0, + 0.0 + ] + } + } + }, + { + "path": "/cad/d1/e10", + "attributes": { + "ifccad::blockInstance": { + "definition": "/cad/d1/block/1", + "transform": { + "placement": { + "origin": [ + 5.0, + 0.0, + 0.0 + ], + "xAxis": [ + 1.0, + 0.0, + 0.0 + ], + "yAxis": [ + 0.0, + 1.0, + 0.0 + ] + }, + "rotation": 0.0, + "scale": [ + 1.0, + 1.0, + 1.0 + ] + } + }, + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByBlock" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "Explicit", + "value": 0.6 + } + }, + "layer": "/cad/d1/layer/0" + } + } + }, + { + "path": "/cad/d1/e11", + "attributes": { + "ifccad::entity": { + "appearance": { + "color": { + "mode": "ByLayer" + }, + "linePattern": { + "mode": "ByLayer" + }, + "lineWeight": { + "mode": "ByLayer" + }, + "opacity": { + "mode": "ByLayer" + } + }, + "layer": "/cad/d1/layer/1" + }, + "ifccad::geom::lineSegment": { + "end": [ + 0.0, + 1.0, + 0.0 + ], + "start": [ + 0.0, + 0.0, + 0.0 + ] + } + } + } + ] +} diff --git a/tests/ifcx_xref_placement.rs b/tests/ifcx_xref_placement.rs new file mode 100644 index 0000000..8f99f7c --- /dev/null +++ b/tests/ifcx_xref_placement.rs @@ -0,0 +1,255 @@ +#![cfg(all(feature = "ifcx", feature = "mline-pilot"))] +use opencaddocument::{ifccad::*, *}; + +#[test] +fn oblique_signed_nonuniform_cad_xref_is_not_discarded() { + let drawing = load_ifccad_bytes( + include_bytes!("fixtures/xref/attachment.ifcx"), + Default::default(), + ) + .unwrap() + .into_document(); + let imported = Ifcx.import_ifccad(&drawing).unwrap(); + let handle = *imported.entity_handles.get(&1000).unwrap(); + let mut cad = imported.document; + let EntityType::Insert(insert) = cad.get_entity_mut(handle).unwrap() else { + panic!() + }; + insert.insert_point = Vector3::new(4., 5., 6.); + insert.normal = Vector3::new(0., 1., 0.); + insert.rotation = 0.5; + insert.set_x_scale(-2.); + insert.set_y_scale(3.); + insert.set_z_scale(4.); + let out = Ifcx.export_ifccad(&cad).unwrap(); + let x = out + .drawing + .model + .entities + .iter() + .find_map(|e| match &e.as_native()?.kind { + IfccadEntityKind::Xref(x) => Some(x), + _ => None, + }) + .unwrap(); + assert_eq!(x.transform.placement.origin, [-4., 6., 5.]); + assert_eq!(x.transform.scale, [-2., 3., 4.]); + assert_eq!(x.transform.rotation, 0.5); + assert_eq!(x.transform.placement.x_axis, [-1., 0., 0.]); + assert_eq!(x.transform.placement.y_axis, [0., 0., 1.]); + assert!( + out.drawing.model.entities.iter().any(|e| matches!( + e.as_native().map(|e| &e.kind), + Some(IfccadEntityKind::Xref(_)) + )), + "XREF was lost: {:?}", + out.losses + ); +} + +#[path = "support/xref_placement.rs"] +mod support; +use support::mixed_owners; + +fn xrefs(d: &IfccadDocument) -> Vec<&IfccadXref> { + d.model + .entities + .iter() + .chain(d.paper_layouts.iter().flat_map(|p| &p.entities)) + .chain(d.blocks.iter().flat_map(|b| &b.entities)) + .filter_map(|e| match &e.as_native()?.kind { + IfccadEntityKind::Xref(x) => Some(x), + _ => None, + }) + .collect() +} + +// Independent evaluation in owner coordinates; compare meaning rather than frame decomposition. +fn point(x: &IfccadXref, p: [f64; 3], base: [f64; 3]) -> [f64; 3] { + let t = &x.transform; + let q = std::array::from_fn::<_, 3, _>(|i| (p[i] - base[i]) * t.scale[i]); + let (c, s) = (t.rotation.cos(), t.rotation.sin()); + let q = [c * q[0] - s * q[1], s * q[0] + c * q[1], q[2]]; + let a = t.placement.x_axis; + let b = t.placement.y_axis; + let z = [ + a[1] * b[2] - a[2] * b[1], + a[2] * b[0] - a[0] * b[2], + a[0] * b[1] - a[1] * b[0], + ]; + std::array::from_fn(|i| t.placement.origin[i] + a[i] * q[0] + b[i] * q[1] + z[i] * q[2]) +} +fn assert_owners(d: &IfccadDocument, sources: usize) { + assert_eq!(d.external_sources.len(), sources); + assert_eq!(xrefs(d).len(), 5); + assert_eq!( + d.paper_layouts + .iter() + .filter(|p| p.entities.iter().any(|e| matches!( + e.as_native().map(|e| &e.kind), + Some(IfccadEntityKind::Xref(_)) + ))) + .count(), + 2 + ); + for name in ["LOCAL", "UNUSED"] { + assert_eq!( + d.blocks + .iter() + .find(|b| b.name == name) + .unwrap() + .entities + .len(), + 1 + ); + } + assert_eq!( + xrefs(d) + .iter() + .filter(|x| x.reference_type == IfccadXrefReferenceType::Overlay) + .count(), + 2 + ); + for x in xrefs(d) { + let p = point(x, [10., 20., 0.], [10., 20., 0.]); + assert_eq!(p, [10., 20., 30.]); + let p = point(x, [11., 20., 0.], [10., 20., 0.]); + for (a, b) in p + .into_iter() + .zip([11.755165123780746, 20., 29.041148922791592]) + { + assert!((a - b).abs() < 1e-10, "{p:?}"); + } + } + validate_ifccad_document(d).unwrap(); + let bytes = encode_ifccad_document(d).unwrap(); + load_ifccad_bytes(bytes.bytes(), Default::default()).unwrap(); +} +#[test] +fn all_owners_and_relationships_survive_preserving_and_physical_cad() { + let d = mixed_owners(); + assert_owners(&d, 1); + let (imported, mut context) = Ifcx.import_ifccad_preserving(&d).unwrap(); + assert!(imported.losses.is_empty(), "{:?}", imported.losses); + assert_eq!(imported.document.file_dependencies.len(), 1); + assert_eq!(imported.document.file_dependencies[0].reference_count, 5); + let back = Ifcx + .export_ifccad_preserving(&imported.document, &mut context) + .unwrap(); + assert!(back.losses.is_empty(), "{:?}", back.losses); + assert_owners(&back.drawing, 1); + assert_eq!(back.drawing.external_sources, d.external_sources); + for (a, b) in xrefs(&back.drawing).iter().zip(xrefs(&d)) { + assert_eq!(a.source_id, b.source_id); + } + for format in [&Dxf as &dyn Format, &Dwg as &dyn Format] { + let (bytes, losses) = format.write(&imported.document).unwrap(); + assert!(losses.is_empty(), "{losses:?}"); + let (cad, _) = format.read(&bytes).unwrap(); + let out = Ifcx.export_ifccad(&cad).unwrap(); + assert!( + !out.losses.iter().any(|l| l.message.contains("XREF")), + "{:?}", + out.losses + ); + assert!( + !out.losses.iter().any(|l| l.message.contains("FileDepList")), + "generated metadata must not cause a loss: {:?}", + out.losses + ); + assert_owners(&out.drawing, 2); + } +} + +#[test] +fn fully_oblique_signed_ocs_insert_has_independent_world_witnesses() { + for scales in [[-2., 3., 4.], [2., -3., 4.], [2., 3., -4.], [-2., -3., 4.]] { + let d = load_ifccad_bytes( + include_bytes!("fixtures/xref/attachment.ifcx"), + Default::default(), + ) + .unwrap() + .into_document(); + let mut cad = Ifcx.import_ifccad(&d).unwrap().document; + let h = cad + .model_space_entities() + .find(|e| matches!(e, EntityType::Insert(_))) + .unwrap() + .common() + .handle; + let EntityType::Insert(i) = cad.get_entity_mut(h).unwrap() else { + panic!() + }; + i.insert_point = Vector3::new(4., 5., 6.); + i.normal = Vector3::new(1., 2., 3.); + i.rotation = 0.5; + i.set_x_scale(scales[0]); + i.set_y_scale(scales[1]); + i.set_z_scale(scales[2]); + let x = [-2. / 5f64.sqrt(), 1. / 5f64.sqrt(), 0.]; + let y = [-3. / 70f64.sqrt(), -6. / 70f64.sqrt(), 5. / 70f64.sqrt()]; + let z = [1. / 14f64.sqrt(), 2. / 14f64.sqrt(), 3. / 14f64.sqrt()]; + let origin = std::array::from_fn::<_, 3, _>(|k| 4. * x[k] + 5. * y[k] + 6. * z[k]); + for format in [&Dxf as &dyn Format, &Dwg as &dyn Format] { + let (bytes, losses) = format.write(&cad).unwrap(); + assert!(losses.is_empty()); + let (read, _) = format.read(&bytes).unwrap(); + let out = Ifcx.export_ifccad(&read).unwrap(); + assert!(out.losses.is_empty(), "{:?}", out.losses); + let refs = xrefs(&out.drawing); + assert_eq!(refs.len(), 1); + let r = refs[0]; + for (a, b) in r.transform.placement.origin.into_iter().zip(origin) { + assert!((a - b).abs() < 1e-10); + } + for axis in 0..3 { + let mut p = [10., 20., 0.]; + p[axis] += 1.; + let actual = point(r, p, [10., 20., 0.]); + let want = std::array::from_fn::<_, 3, _>(|k| { + origin[k] + + scales[axis] + * match axis { + 0 => 0.5f64.cos() * x[k] + 0.5f64.sin() * y[k], + 1 => -0.5f64.sin() * x[k] + 0.5f64.cos() * y[k], + _ => z[k], + } + }); + for (a, b) in actual.into_iter().zip(want) { + assert!((a - b).abs() < 1e-10, "axis{axis}: {actual:?} != {want:?}"); + } + } + validate_ifccad_document(&out.drawing).unwrap(); + } + } +} +#[test] +fn setter_projection_reports_loss_on_every_axis_instead_of_clamping_silently() { + for axis in 0..3 { + let mut d = load_ifccad_bytes( + include_bytes!("fixtures/xref/attachment.ifcx"), + Default::default(), + ) + .unwrap() + .into_document(); + let IfccadEntityKind::Xref(x) = &mut d.model.entities[0].as_native_mut().unwrap().kind + else { + panic!() + }; + x.transform.scale[axis] = -1e-30; + validate_ifccad_document(&d).unwrap(); + let imported = Ifcx.import_ifccad(&d).unwrap(); + assert!( + imported + .losses + .iter() + .any(|l| l.message.contains("XREF scale cannot be represented")), + "{:?}", + imported.losses + ); + assert!(!imported + .document + .model_space_entities() + .any(|e| matches!(e, EntityType::Insert(_)))); + } +} diff --git a/tests/ifcx_xref_reference_types.rs b/tests/ifcx_xref_reference_types.rs index 48d3940..88b12cb 100644 --- a/tests/ifcx_xref_reference_types.rs +++ b/tests/ifcx_xref_reference_types.rs @@ -22,7 +22,7 @@ fn xref_same_source_attach_overlay_preserving_roundtrip() { panic!() }; x.reference_type = IfccadXrefReferenceType::Overlay; - x.placement.origin[0] += 100.; + x.transform.placement.origin[0] += 100.; drawing.model.entities.push(IfccadEntity::Native(overlay)); let mut unused = drawing.external_sources[0].clone(); unused.id = drawing.id_counters.allocate_external_source_id().unwrap(); @@ -59,16 +59,33 @@ fn xref_same_source_attach_overlay_preserving_roundtrip() { panic!() }; assert_eq!( - (a.source_id, a.reference_type, a.scale, a.placement.origin), - (b.source_id, b.reference_type, b.scale, b.placement.origin) + ( + a.source_id, + a.reference_type, + a.transform.scale, + a.transform.placement.origin + ), + ( + b.source_id, + b.reference_type, + b.transform.scale, + b.transform.placement.origin + ) ); - for (a, b) in a - .placement - .x_axis - .iter() - .chain(&a.placement.y_axis) - .zip(b.placement.x_axis.iter().chain(&b.placement.y_axis)) - { + // OCS canonicalization may move in-plane angle between frame and rotation. + let columns = |x: &IfccadXref| { + let (c, s) = (x.transform.rotation.cos(), x.transform.rotation.sin()); + let p = &x.transform.placement; + std::array::from_fn::<_, 6, _>(|i| { + let k = i % 3; + if i < 3 { + c * p.x_axis[k] + s * p.y_axis[k] + } else { + -s * p.x_axis[k] + c * p.y_axis[k] + } + }) + }; + for (a, b) in columns(a).into_iter().zip(columns(b)) { assert!((a - b).abs() < 1e-12); } } @@ -128,7 +145,7 @@ fn overlay_type_survives_physical_dwg_and_dxf() { panic!() }; assert_eq!(x.reference_type, IfccadXrefReferenceType::Overlay); - assert_eq!(x.scale, 500.); + assert_eq!(x.transform.scale, [500.; 3]); validate_ifccad_document(&back.drawing).unwrap(); } } diff --git a/tests/ifcx_xref_source_formats.rs b/tests/ifcx_xref_source_formats.rs index 1307b7c..d9ca747 100644 --- a/tests/ifcx_xref_source_formats.rs +++ b/tests/ifcx_xref_source_formats.rs @@ -33,26 +33,26 @@ fn preserving_dxf_source_keeps_typed_identity_even_with_dwg_filename() { panic!("XREF placement expected") }; assert_eq!(actual.source_id, expected.source_id); - assert_eq!(actual.scale, expected.scale); - assert_eq!(actual.placement.origin, expected.placement.origin); - for (a, b) in actual - .placement - .x_axis - .iter() - .chain(&actual.placement.y_axis) - .zip( - expected - .placement - .x_axis - .iter() - .chain(&expected.placement.y_axis), - ) - { - assert!((a - b).abs() <= 1e-12); + assert_eq!(actual.transform.scale, expected.transform.scale); + assert_eq!( + actual.transform.placement.origin, + expected.transform.placement.origin + ); + let axis = |x: &IfccadXref| { + let (c, s) = (x.transform.rotation.cos(), x.transform.rotation.sin()); + let p = &x.transform.placement; + std::array::from_fn::<_, 6, _>(|i| { + let k = i % 3; + if i < 3 { + c * p.x_axis[k] + s * p.y_axis[k] + } else { + -s * p.x_axis[k] + c * p.y_axis[k] + } + }) + }; + for (a, b) in axis(actual).into_iter().zip(axis(expected)) { + assert!((a - b).abs() < 1e-12); } - let encoded = encode_ifccad_document(&saved.drawing).unwrap(); - let read = load_ifccad_bytes(encoded.bytes(), Default::default()).unwrap(); - assert_eq!(read.document().external_sources, drawing.external_sources); } #[test] diff --git a/tests/ifcx_xrefs.rs b/tests/ifcx_xrefs.rs index d12c758..9af7842 100644 --- a/tests/ifcx_xrefs.rs +++ b/tests/ifcx_xrefs.rs @@ -45,7 +45,7 @@ fn offline_xref_roundtrip_keeps_source_and_effective_placement() { else { panic!() }; - assert_eq!(saved.scale, 500.); + assert_eq!(saved.transform.scale, [500.; 3]); for (format, keep_guid) in [(&Dwg as &dyn Format, true), (&Dxf as &dyn Format, false)] { let (bytes, losses) = format.write(&imported.document).unwrap(); assert!(losses.is_empty(), "{losses:?}"); @@ -66,8 +66,14 @@ fn offline_xref_roundtrip_keeps_source_and_effective_placement() { else { panic!() }; - assert_eq!(x.scale, 500.); - assert!((x.placement.x_axis[1] - 1.).abs() < 1e-12); + assert_eq!(x.transform.scale, [500.; 3]); + assert!( + ((x.transform.rotation + + x.transform.placement.x_axis[1].atan2(x.transform.placement.x_axis[0])) + - std::f64::consts::FRAC_PI_2) + .abs() + < 1e-12 + ); validate_ifccad_document(&back.drawing).unwrap(); } } @@ -131,49 +137,20 @@ fn source_without_insert_is_retained_and_deletion_does_not_reuse_id() { #[test] fn unsupported_cad_attachment_variants_are_explicit_losses() { - for variant in ["array", "paper", "block"] { + for (rows, columns) in [(2, 1), (1, 2)] { let imported = Ifcx.import_ifccad(&drawing()).unwrap(); let mut cad = imported.document; let handle = *imported.entity_handles.get(&1000).unwrap(); - if variant == "overlay" { - cad.block_records - .get_mut("grondplan") - .unwrap() - .flags - .is_xref_overlay = true; - } - if variant == "array" { - let EntityType::Insert(i) = cad.get_entity_mut(handle).unwrap() else { - panic!() - }; - i.row_count = 2; - } - if variant == "paper" { - let owner = cad - .block_records - .iter() - .find(|b| b.is_paper_space()) - .unwrap() - .handle; - cad.get_entity_mut(handle) - .unwrap() - .common_mut() - .owner_handle = owner; - } - if variant == "block" { - let mut record = tables::BlockRecord::new("LOCAL"); - record.handle = cad.allocate_handle(); - let owner = record.handle; - cad.block_records.add(record).unwrap(); - cad.get_entity_mut(handle) - .unwrap() - .common_mut() - .owner_handle = owner; - } + let EntityType::Insert(insert) = cad.get_entity_mut(handle).unwrap() else { + panic!() + }; + insert.row_count = rows; + insert.column_count = columns; + let out = Ifcx.export_ifccad(&cad).unwrap(); assert!( out.losses.iter().any(|l| l.message.contains("XREF")), - "{variant}: {:?}", + "array {rows}x{columns}: {:?}", out.losses ); assert!(!out diff --git a/tests/support/xref_placement.rs b/tests/support/xref_placement.rs new file mode 100644 index 0000000..c32108c --- /dev/null +++ b/tests/support/xref_placement.rs @@ -0,0 +1,84 @@ +use opencaddocument::ifccad::*; +pub fn mixed_owners() -> IfccadDocument { + let mut d = load_ifccad_bytes( + include_bytes!("../fixtures/xref/paper-layouts.ifcx"), + Default::default(), + ) + .unwrap() + .into_document(); + let source = load_ifccad_bytes( + include_bytes!("../fixtures/xref/attachment.ifcx"), + Default::default(), + ) + .unwrap() + .into_document(); + d.external_sources = source.external_sources; + d.id_counters.next_external_source_id = source.id_counters.next_external_source_id; + let mut template = source.model.entities[0].as_native().unwrap().clone(); + if let IfccadEntityKind::Xref(x) = &mut template.kind { + x.transform = IfccadBlockTransform { + placement: IfccadPlacement { + origin: [10., 20., 30.], + x_axis: [-1., 0., 0.], + y_axis: [0., 0., 1.], + }, + rotation: 0.5, + scale: [-2., 3., 4.], + }; + } + for paper in &mut d.paper_layouts { + let mut e = template.clone(); + e.id = d.id_counters.allocate_entity_id().unwrap(); + if let IfccadEntityKind::Xref(x) = &mut e.kind { + x.reference_type = IfccadXrefReferenceType::Overlay; + } + paper.entities = vec![IfccadEntity::Native(e)]; + paper.bounds = None; + paper.bounds_quality = None; + } + for name in ["LOCAL", "UNUSED"] { + let mut e = template.clone(); + e.id = d.id_counters.allocate_entity_id().unwrap(); + let id = d.id_counters.allocate_block_id().unwrap(); + d.blocks.push(IfccadBlockDefinition { + annotation: Default::default(), + description: String::new(), + anonymous: false, + explodable: true, + uniform_scaling: false, + bounds_quality: None, + id, + name: name.into(), + base_point: [1., 2., 3.], + insertion_unit: d.length_unit.clone(), + bounds: None, + entities: vec![IfccadEntity::Native(e)], + }); + if name == "LOCAL" { + for origin in [[100., 0., 0.], [0., 100., 0.]] { + let mut e = template.clone(); + e.id = d.id_counters.allocate_entity_id().unwrap(); + e.kind = IfccadEntityKind::BlockInstance { + definition_id: id, + attributes: vec![], + annotation: None, + transform: IfccadBlockTransform { + placement: IfccadPlacement { + origin, + x_axis: [1., 0., 0.], + y_axis: [0., 1., 0.], + }, + rotation: 0.7, + scale: [2., 3., 4.], + }, + }; + d.model.entities.push(IfccadEntity::Native(e)); + } + } + } + template.id = d.id_counters.allocate_entity_id().unwrap(); + d.model.entities.push(IfccadEntity::Native(template)); + recompute_ifccad_document_bounds(&mut d).unwrap(); + validate_ifccad_document(&d).unwrap(); + d +} From 049575d1df13b89bed622c36a08d660cb1082f8b Mon Sep 17 00:00:00 2001 From: BjornFidder Date: Fri, 27 Nov 2026 16:25:09 +0100 Subject: [PATCH 2/2] Pin the staged native XREF placement contract --- Cargo.lock | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index baa0bd8..99d323e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,6 +450,7 @@ dependencies = [ [[package]] name = "ifccad" version = "2026.48.0" +source = "git+https://github.com/OpenAEC-Foundation/ifccad.git?rev=207a5ad6f24f73e1e53d994d4c3ac52d1e616ab7#207a5ad6f24f73e1e53d994d4c3ac52d1e616ab7" dependencies = [ "base64", "fpmath", diff --git a/Cargo.toml b/Cargo.toml index 33cd32b..b10579d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ acadrust = { git = "https://github.com/hakanaktt/acadrust.git", rev = "f1f7a8b46 rmp-serde = { version = "=1.3.0", optional = true } serde = { version = "1", features = ["derive"], optional = true } # ifccad only reads and writes IFCX; the mapping to `Document` lives here. -ifccad = { git = "https://github.com/OpenAEC-Foundation/ifccad.git", rev = "785590abb669c38afb700b339d36cc8cc0c18161", optional = true } +ifccad = { git = "https://github.com/OpenAEC-Foundation/ifccad.git", rev = "207a5ad6f24f73e1e53d994d4c3ac52d1e616ab7", optional = true } web-time = { version = "1", optional = true } [dev-dependencies]