From 76972db0a4ab0655da17598b5d348a3c22121448 Mon Sep 17 00:00:00 2001 From: mahach666 <79989386+mahach666@users.noreply.github.com> Date: Wed, 18 Nov 2026 06:46:20 +0300 Subject: [PATCH] Keep the tabular CSV bridge out of the native IFC build --- CONTRIBUTING.md | 2 +- README.md | 6 +++--- .../Csv}/IfcCsvBridge.cs | 0 .../Compatibility/IfcModel.Compatibility.cs | 17 +++++++++++++++++ src/IfcIO/IfcModel.cs | 16 ---------------- 5 files changed, 21 insertions(+), 20 deletions(-) rename src/IfcIO/{Model => Compatibility/Csv}/IfcCsvBridge.cs (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df333b6..776c475 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ Do not put personal data in code, documentation, test data or commit metadata. U ## Scene adapter -The frozen viewer, non-IFC exporters and coordination implementations live in +The frozen viewer, coordination implementations and tabular CSV bridge live in `src/IfcIO/Compatibility`. The regular build keeps their public namespaces, signatures and assembly identity. Native IFC validation, including IDS, stays with the engine. BCF reporting uses the compatibility implementation. diff --git a/README.md b/README.md index 364079c..52a09d8 100644 --- a/README.md +++ b/README.md @@ -151,11 +151,11 @@ Reads and writes ISO 10303-21 STEP physical files conforming to **IFC2x3 Coordin IfcIO reads and writes IFC. The following extras are frozen: they get bug fixes only, no new features or options. - HTML viewer (`IfcHtmlViewerExporter`, `ifcio view`). [IOViewer](https://github.com/IOExtend/IOViewer) can already open IFC files through the `IfcIO.Scene` adapter. -- GLB and OBJ export (`IfcGlbExporter`, `IfcObjExporter`). A shared GLB writer is available in the `IOScene.Formats` source preview. -- Clash detection, measure, grids, diff, and BCF archives (`IfcClashDetector`, `IfcClashGrouper`, `IfcMeasureEngine`, `IfcGridSystem`, `IfcDiffEngine`, `BcfArchive`, `BcfZipExporter`). The `IOCoord` source preview implements coordination queries and BCF export. +- GLB and OBJ export (`IfcGlbExporter`, `IfcObjExporter`). The `IOScene.Formats` preview provides shared GLB and OBJ writers. +- Clash detection, measure, grids, diff, and BCF archives (`IfcClashDetector`, `IfcClashGrouper`, `IfcMeasureEngine`, `IfcGridSystem`, `IfcDiffEngine`, `BcfArchive`, `BcfZipExporter`). The `IOCoord` preview implements coordination queries and BCF export. - IFC work-schedule (4D) sequence logic. It stays in IfcIO. -The [optional IOScene tools](https://github.com/IOExtend/IOScene/blob/main/docs/tools.md) are available from source. +The [optional IOScene tools](https://github.com/IOExtend/IOScene/blob/main/docs/tools.md) are available as NuGet preview packages. The frozen features stay available and are removed no earlier than IfcIO 1.0, and only after a published replacement exists. ## Build from source and tests diff --git a/src/IfcIO/Model/IfcCsvBridge.cs b/src/IfcIO/Compatibility/Csv/IfcCsvBridge.cs similarity index 100% rename from src/IfcIO/Model/IfcCsvBridge.cs rename to src/IfcIO/Compatibility/Csv/IfcCsvBridge.cs diff --git a/src/IfcIO/Compatibility/IfcModel.Compatibility.cs b/src/IfcIO/Compatibility/IfcModel.Compatibility.cs index 8f2c130..b1e6da1 100644 --- a/src/IfcIO/Compatibility/IfcModel.Compatibility.cs +++ b/src/IfcIO/Compatibility/IfcModel.Compatibility.cs @@ -1,9 +1,26 @@ using IfcIO.Exporters; +using IfcIO.Model; namespace IfcIO; public sealed partial class IfcModel { + /// Exports elements and selected properties to a CSV spreadsheet file. + public void ExportCsv(string path, IEnumerable propertyNames, string delimiter = ";") => + IfcCsvBridge.ExportFile(this, path, propertyNames, delimiter); + + /// Exports elements and selected properties to a CSV . + public void ExportCsv(TextWriter writer, IEnumerable propertyNames, string delimiter = ";") => + IfcCsvBridge.Export(this, writer, propertyNames, delimiter); + + /// Imports tabular CSV property values into matching elements by GlobalId or Id from a file. + public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(string path, string delimiter = ";") => + IfcCsvBridge.ImportFile(this, path, delimiter); + + /// Imports tabular CSV property values into matching elements by GlobalId or Id from a . + public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(TextReader reader, string delimiter = ";") => + IfcCsvBridge.Import(this, reader, delimiter); + /// Spatial grid system (axes and levels) associated with the IFC model. public Grids.IfcGridSystem? GridSystem { get; set; } diff --git a/src/IfcIO/IfcModel.cs b/src/IfcIO/IfcModel.cs index 0e02f1b..27c04a8 100644 --- a/src/IfcIO/IfcModel.cs +++ b/src/IfcIO/IfcModel.cs @@ -613,22 +613,6 @@ public Validation.Ids.IfcIdsValidationReport ValidateIds(Stream idsStream) => public Validation.Ids.IfcIdsValidationReport ValidateIds(System.Xml.Linq.XDocument idsDoc) => Validation.Ids.IfcIdsValidator.Validate(this, idsDoc); - /// Exports elements and selected properties to a CSV spreadsheet file. - public void ExportCsv(string path, IEnumerable propertyNames, string delimiter = ";") => - IfcCsvBridge.ExportFile(this, path, propertyNames, delimiter); - - /// Exports elements and selected properties to a CSV . - public void ExportCsv(TextWriter writer, IEnumerable propertyNames, string delimiter = ";") => - IfcCsvBridge.Export(this, writer, propertyNames, delimiter); - - /// Imports tabular CSV property values into matching elements by GlobalId or Id from a file. - public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(string path, string delimiter = ";") => - IfcCsvBridge.ImportFile(this, path, delimiter); - - /// Imports tabular CSV property values into matching elements by GlobalId or Id from a . - public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(TextReader reader, string delimiter = ";") => - IfcCsvBridge.Import(this, reader, delimiter); - /// Serializes the IFC model to a file on disk (.ifc or .ifczip). public void Save(string path) {