Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions src/IfcIO/Compatibility/IfcModel.Compatibility.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
using IfcIO.Exporters;
using IfcIO.Model;

namespace IfcIO;

public sealed partial class IfcModel
{
/// <summary>Exports elements and selected properties to a CSV spreadsheet file.</summary>
public void ExportCsv(string path, IEnumerable<string> propertyNames, string delimiter = ";") =>
IfcCsvBridge.ExportFile(this, path, propertyNames, delimiter);

/// <summary>Exports elements and selected properties to a CSV <see cref="TextWriter"/>.</summary>
public void ExportCsv(TextWriter writer, IEnumerable<string> propertyNames, string delimiter = ";") =>
IfcCsvBridge.Export(this, writer, propertyNames, delimiter);

/// <summary>Imports tabular CSV property values into matching elements by GlobalId or Id from a file.</summary>
public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(string path, string delimiter = ";") =>
IfcCsvBridge.ImportFile(this, path, delimiter);

/// <summary>Imports tabular CSV property values into matching elements by GlobalId or Id from a <see cref="TextReader"/>.</summary>
public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(TextReader reader, string delimiter = ";") =>
IfcCsvBridge.Import(this, reader, delimiter);

/// <summary>Spatial grid system (axes and levels) associated with the IFC model.</summary>
public Grids.IfcGridSystem? GridSystem { get; set; }

Expand Down
16 changes: 0 additions & 16 deletions src/IfcIO/IfcModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/// <summary>Exports elements and selected properties to a CSV spreadsheet file.</summary>
public void ExportCsv(string path, IEnumerable<string> propertyNames, string delimiter = ";") =>
IfcCsvBridge.ExportFile(this, path, propertyNames, delimiter);

/// <summary>Exports elements and selected properties to a CSV <see cref="TextWriter"/>.</summary>
public void ExportCsv(TextWriter writer, IEnumerable<string> propertyNames, string delimiter = ";") =>
IfcCsvBridge.Export(this, writer, propertyNames, delimiter);

/// <summary>Imports tabular CSV property values into matching elements by GlobalId or Id from a file.</summary>
public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(string path, string delimiter = ";") =>
IfcCsvBridge.ImportFile(this, path, delimiter);

/// <summary>Imports tabular CSV property values into matching elements by GlobalId or Id from a <see cref="TextReader"/>.</summary>
public (int ElementsUpdated, int PropertiesUpdated) ImportCsv(TextReader reader, string delimiter = ";") =>
IfcCsvBridge.Import(this, reader, delimiter);

/// <summary>Serializes the IFC model to a file on disk (.ifc or .ifczip).</summary>
public void Save(string path)
{
Expand Down
Loading