diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 632fea4..c91d5ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,9 @@ jobs: - name: Pack NuGet Packages run: dotnet pack IfcIO.slnx -c Release --no-build -o artifacts + - name: Build the scene adapter against the native engine + run: dotnet build src/IfcIO.Scene/IfcIO.Scene.csproj -c Release -p:BuildNativeCoreOnly=true --artifacts-path native-core-check + - name: Upload Artifacts uses: actions/upload-artifact@v7 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9730097..df333b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,18 @@ 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 +`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. + +CI also builds the native engine and its scene adapter with the compatibility +sources excluded. This check is non-packable and uses a separate artifact path. + +```sh +dotnet build src/IfcIO.Scene/IfcIO.Scene.csproj -c Release -p:BuildNativeCoreOnly=true --artifacts-path ./artifacts/native-core-check +``` + `src/IfcIO.Scene` converts IfcIO models into `IOScene` documents and uses only the public API of `IfcIO`; the `IfcIO` package itself keeps no dependencies. `IOScene` is referenced with the range `[0.1.0, 0.2.0-0.0)`, and restore takes the lowest version in it, 0.1.0 from NuGet.org. To build against an `IOScene` version that is not on NuGet.org yet, start diff --git a/README.md b/README.md index aba5234..364079c 100644 --- a/README.md +++ b/README.md @@ -150,12 +150,13 @@ 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`). Viewing will move to [IOViewer](https://github.com/IOExtend/IOViewer) through the `IfcIO.Scene` adapter over the shared `IOScene` model. -- GLB and OBJ export (`IfcGlbExporter`, `IfcObjExporter`). A shared GLB writer is planned in `IOScene.Formats`. -- Clash detection, measure, grids, diff, and BCF archives (`IfcClashDetector`, `IfcClashGrouper`, `IfcMeasureEngine`, `IfcGridSystem`, `IfcDiffEngine`, `BcfArchive`, `BcfZipExporter`). These will move to a planned `IOCoord` package. +- 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. - IFC work-schedule (4D) sequence logic. It stays in IfcIO. -None of these replacements is published yet. The frozen features stay available and are removed no earlier than IfcIO 1.0, and only after a published replacement exists. +The [optional IOScene tools](https://github.com/IOExtend/IOScene/blob/main/docs/tools.md) are available from source. +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.Scene/IfcIO.Scene.csproj b/src/IfcIO.Scene/IfcIO.Scene.csproj index 08f5731..8fcbb9a 100644 --- a/src/IfcIO.Scene/IfcIO.Scene.csproj +++ b/src/IfcIO.Scene/IfcIO.Scene.csproj @@ -1,5 +1,9 @@ + + false + + Converts IFC models read by IfcIO into IOScene documents in metres with Z up, keeping GlobalIds, storeys, property sets, quantities and 4D schedules. true diff --git a/src/IfcIO/Bcf/BcfArchive.cs b/src/IfcIO/Compatibility/Bcf/BcfArchive.cs similarity index 100% rename from src/IfcIO/Bcf/BcfArchive.cs rename to src/IfcIO/Compatibility/Bcf/BcfArchive.cs diff --git a/src/IfcIO/Bcf/BcfTypes.cs b/src/IfcIO/Compatibility/Bcf/BcfTypes.cs similarity index 100% rename from src/IfcIO/Bcf/BcfTypes.cs rename to src/IfcIO/Compatibility/Bcf/BcfTypes.cs diff --git a/src/IfcIO/Bcf/BcfZipExporter.cs b/src/IfcIO/Compatibility/Bcf/BcfZipExporter.cs similarity index 100% rename from src/IfcIO/Bcf/BcfZipExporter.cs rename to src/IfcIO/Compatibility/Bcf/BcfZipExporter.cs diff --git a/src/IfcIO/Clash/IfcClashDetector.cs b/src/IfcIO/Compatibility/Clash/IfcClashDetector.cs similarity index 100% rename from src/IfcIO/Clash/IfcClashDetector.cs rename to src/IfcIO/Compatibility/Clash/IfcClashDetector.cs diff --git a/src/IfcIO/Clash/IfcClashGrouper.cs b/src/IfcIO/Compatibility/Clash/IfcClashGrouper.cs similarity index 100% rename from src/IfcIO/Clash/IfcClashGrouper.cs rename to src/IfcIO/Compatibility/Clash/IfcClashGrouper.cs diff --git a/src/IfcIO/Clash/IfcClashTypes.cs b/src/IfcIO/Compatibility/Clash/IfcClashTypes.cs similarity index 100% rename from src/IfcIO/Clash/IfcClashTypes.cs rename to src/IfcIO/Compatibility/Clash/IfcClashTypes.cs diff --git a/src/IfcIO/Diff/IfcDiffEngine.cs b/src/IfcIO/Compatibility/Diff/IfcDiffEngine.cs similarity index 100% rename from src/IfcIO/Diff/IfcDiffEngine.cs rename to src/IfcIO/Compatibility/Diff/IfcDiffEngine.cs diff --git a/src/IfcIO/Diff/IfcDiffTypes.cs b/src/IfcIO/Compatibility/Diff/IfcDiffTypes.cs similarity index 100% rename from src/IfcIO/Diff/IfcDiffTypes.cs rename to src/IfcIO/Compatibility/Diff/IfcDiffTypes.cs diff --git a/src/IfcIO/Exporters/IfcGlbExporter.cs b/src/IfcIO/Compatibility/Exporters/IfcGlbExporter.cs similarity index 100% rename from src/IfcIO/Exporters/IfcGlbExporter.cs rename to src/IfcIO/Compatibility/Exporters/IfcGlbExporter.cs diff --git a/src/IfcIO/Exporters/IfcHtmlViewerExporter.cs b/src/IfcIO/Compatibility/Exporters/IfcHtmlViewerExporter.cs similarity index 100% rename from src/IfcIO/Exporters/IfcHtmlViewerExporter.cs rename to src/IfcIO/Compatibility/Exporters/IfcHtmlViewerExporter.cs diff --git a/src/IfcIO/Exporters/IfcObjExporter.cs b/src/IfcIO/Compatibility/Exporters/IfcObjExporter.cs similarity index 100% rename from src/IfcIO/Exporters/IfcObjExporter.cs rename to src/IfcIO/Compatibility/Exporters/IfcObjExporter.cs diff --git a/src/IfcIO/Grids/IfcGridTypes.cs b/src/IfcIO/Compatibility/Grids/IfcGridTypes.cs similarity index 100% rename from src/IfcIO/Grids/IfcGridTypes.cs rename to src/IfcIO/Compatibility/Grids/IfcGridTypes.cs diff --git a/src/IfcIO/Compatibility/IfcIdsValidationReport.Compatibility.cs b/src/IfcIO/Compatibility/IfcIdsValidationReport.Compatibility.cs new file mode 100644 index 0000000..c0aef99 --- /dev/null +++ b/src/IfcIO/Compatibility/IfcIdsValidationReport.Compatibility.cs @@ -0,0 +1,39 @@ +using IfcIO.Bcf; + +namespace IfcIO.Validation.Ids; + +public sealed partial class IfcIdsValidationReport +{ + /// + /// Exports all IDS compliance failures directly to a buildingSMART BCF 2.1 zip archive (.bcfzip) + /// for issue tracking and resolution in Revit, Solibri, and BIMcollab. + /// + public void SaveBcf(string path) + { + ArgumentNullException.ThrowIfNull(path); + + var topics = new List(); + foreach (var failure in Failures) + { + var topic = new BcfTopic + { + Title = $"[IDS Violation] {failure.SpecificationName}: {failure.ElementType} #{failure.ElementId}", + Description = $"{failure.Message} (Element: '{failure.ElementName}', GUID: {failure.ElementGuid ?? "N/A"})", + TopicType = "Compliance", + TopicStatus = "Active", + CreationAuthor = Author ?? "IfcIO IDS Validator", + }; + + if (!string.IsNullOrEmpty(failure.ElementGuid)) + { + var vp = new BcfViewpoint(); + vp.SelectedElementGuids.Add(failure.ElementGuid); + topic.Viewpoints.Add(vp); + } + + topics.Add(topic); + } + + BcfZipExporter.Save(path, topics, Title); + } +} diff --git a/src/IfcIO/Compatibility/IfcModel.Compatibility.cs b/src/IfcIO/Compatibility/IfcModel.Compatibility.cs new file mode 100644 index 0000000..8f2c130 --- /dev/null +++ b/src/IfcIO/Compatibility/IfcModel.Compatibility.cs @@ -0,0 +1,137 @@ +using IfcIO.Exporters; + +namespace IfcIO; + +public sealed partial class IfcModel +{ + /// Spatial grid system (axes and levels) associated with the IFC model. + public Grids.IfcGridSystem? GridSystem { get; set; } + + /// Imports a BCF 2.1 archive (.bcfzip) file from disk. + public static List ImportBcf(string path) + { + ArgumentNullException.ThrowIfNull(path); + return Bcf.BcfArchive.Open(path).Topics; + } + + /// Exports a collection of BCF topics to a buildingSMART BCF 2.1 zip archive (.bcfzip). + public void SaveBcf(string path, IEnumerable topics) + { + Bcf.BcfZipExporter.Save(path, topics, ProjectName); + } + + /// Exports a collection of BCF topics to a stream in BCF 2.1 format. + public void SaveBcf(Stream stream, IEnumerable topics) + { + Bcf.BcfZipExporter.Write(stream, topics, ProjectName); + } + + /// + /// Runs model validation and exports any detected errors or warnings as a BCF 2.1 archive (.bcfzip) + /// with affected element GUIDs linked for cross-discipline issue coordination. + /// + public void ExportValidationBcf(string path) + { + var result = Validate(); + var topics = new List(); + + foreach (var err in result.Errors) + { + var topic = new Bcf.BcfTopic( + title: $"Validation Error: {err.RuleId}", + description: err.Message, + topicType: "Error", + priority: "High"); + + string? targetGuid = err.GlobalId; + if (string.IsNullOrEmpty(targetGuid) && err.ElementId.HasValue) + { + var elem = AllElements.FirstOrDefault(e => e.Id == err.ElementId.Value); + if (elem is not null) targetGuid = elem.GlobalId; + else + { + var sp = AllSpaces.FirstOrDefault(s => s.Id == err.ElementId.Value); + if (sp is not null) targetGuid = sp.GlobalId; + } + } + + if (!string.IsNullOrEmpty(targetGuid)) + { + var vp = new Bcf.BcfViewpoint(); + vp.SelectedElementGuids.Add(targetGuid); + topic.Viewpoints.Add(vp); + } + topics.Add(topic); + } + + foreach (var warn in result.Warnings) + { + var topic = new Bcf.BcfTopic( + title: $"Validation Warning: {warn.RuleId}", + description: warn.Message, + topicType: "Warning", + priority: "Normal"); + + string? targetGuid = warn.GlobalId; + if (string.IsNullOrEmpty(targetGuid) && warn.ElementId.HasValue) + { + var elem = AllElements.FirstOrDefault(e => e.Id == warn.ElementId.Value); + if (elem is not null) targetGuid = elem.GlobalId; + else + { + var sp = AllSpaces.FirstOrDefault(s => s.Id == warn.ElementId.Value); + if (sp is not null) targetGuid = sp.GlobalId; + } + } + + if (!string.IsNullOrEmpty(targetGuid)) + { + var vp = new Bcf.BcfViewpoint(); + vp.SelectedElementGuids.Add(targetGuid); + topic.Viewpoints.Add(vp); + } + topics.Add(topic); + } + + SaveBcf(path, topics); + } + + /// Loads BCF topics from a BCF 2.1 zip archive (.bcfzip). + public static List LoadBcf(string path) => Bcf.BcfZipExporter.Open(path); + + /// Exports the model to binary glTF 2.0 (.glb) format. + public void SaveGlb(string path) => IfcGlbExporter.Save(this, path); + + /// Exports the model to binary glTF 2.0 (.glb) stream. + public void SaveGlb(Stream stream) => IfcGlbExporter.Write(this, stream); + + /// Exports the model to Wavefront OBJ format (.obj + .mtl). + public void SaveObj(string path) => IfcObjExporter.Save(this, path); + + /// Performs geometric clash detection between this model and another IFC model. + public Clash.IfcClashReport DetectClashes(IfcModel otherModel, Clash.IfcClashOptions? options = null) => + Clash.IfcClashDetector.DetectClashes(this, otherModel, options); + + /// Performs geometric self-clash detection within this IFC model. + public Clash.IfcClashReport DetectClashes(Clash.IfcClashOptions? options = null) => + Clash.IfcClashDetector.DetectClashes(this, options); + + /// Compares this baseline model against a revision model, detecting added, deleted, and modified elements. + public Diff.IfcDiffReport Compare(IfcModel revisionModel, Diff.IfcDiffOptions? options = null) => + Diff.IfcDiffEngine.Compare(this, revisionModel, options); + + /// Exports the model to a standalone, interactive 3D WebGL HTML viewer (.html) with zero dependencies. + public void SaveHtmlViewer(string path, Exporters.IfcHtmlViewerOptions? options = null) => + Exporters.IfcHtmlViewerExporter.Save(path, this, options); + + /// Populates grid location tags across elements in this model using the attached or extracted grid system. + public int AssignGridLocations(Grids.IfcGridSystem? gridSystem = null) + { + var grids = gridSystem ?? GridSystem ?? ExtractGridSystem(); + GridSystem = grids; + return grids.AssignGridLocations(this); + } + + /// Automatically extracts grid axes from IFCGRID elements or metadata in this model. + public Grids.IfcGridSystem ExtractGridSystem() => Grids.IfcGridSystem.ExtractFromModel(this); +} diff --git a/src/IfcIO/Measure/IfcMeasureEngine.cs b/src/IfcIO/Compatibility/Measure/IfcMeasureEngine.cs similarity index 100% rename from src/IfcIO/Measure/IfcMeasureEngine.cs rename to src/IfcIO/Compatibility/Measure/IfcMeasureEngine.cs diff --git a/src/IfcIO/IfcIO.csproj b/src/IfcIO/IfcIO.csproj index ca77679..b1b24e3 100644 --- a/src/IfcIO/IfcIO.csproj +++ b/src/IfcIO/IfcIO.csproj @@ -6,4 +6,12 @@ true + + false + + + + + + diff --git a/src/IfcIO/IfcModel.cs b/src/IfcIO/IfcModel.cs index bca8896..0e02f1b 100644 --- a/src/IfcIO/IfcModel.cs +++ b/src/IfcIO/IfcModel.cs @@ -2,7 +2,6 @@ using System.IO.Compression; using System.Text; using IfcIO.Core; -using IfcIO.Exporters; using IfcIO.Geometry; using IfcIO.Model; using IfcIO.Schema; @@ -12,10 +11,9 @@ namespace IfcIO; /// /// Top-level in-memory IFC BIM model. /// Manages spatial hierarchy (Project, Site, Building, Storeys), geometry meshes, -/// materials, property sets, and serialization to ISO 10303-21 STEP physical files (.ifc, .ifczip), -/// binary glTF 2.0 (.glb), and Wavefront OBJ (.obj). +/// materials, property sets, and serialization to ISO 10303-21 STEP physical files (.ifc, .ifczip). /// -public sealed class IfcModel +public sealed partial class IfcModel { private const string DegreeInRadians = "0.017453292519943278"; @@ -43,9 +41,6 @@ public sealed class IfcModel public List WorkSchedules { get; } = []; public List CostSchedules { get; } = []; - /// Spatial grid system (axes and levels) associated with the IFC model. - public Grids.IfcGridSystem? GridSystem { get; set; } - public IEnumerable AllElements => Storeys.SelectMany(s => s.Elements); public IEnumerable AllSpaces => Storeys.SelectMany(s => s.Spaces); public IEnumerable AllOpenings => AllElements.SelectMany(e => e.Openings); @@ -421,13 +416,6 @@ public double GetSimulationProgressAt(DateTime date) return WorkSchedules[0].GetProgressAt(date); } - /// Imports a BCF 2.1 archive (.bcfzip) file from disk. - public static List ImportBcf(string path) - { - ArgumentNullException.ThrowIfNull(path); - return Bcf.BcfArchive.Open(path).Topics; - } - /// /// Adds an element defined by a 3D solid clipped by an infinite plane (Constructive Solid Geometry / Boolean clipping). /// Conforms to buildingSMART IFCBOOLEANCLIPPINGRESULT. @@ -582,91 +570,6 @@ public void AssignMaterialProfileSet(IfcElement element, IfcMaterialProfileSet p } } - /// Exports a collection of BCF topics to a buildingSMART BCF 2.1 zip archive (.bcfzip). - public void SaveBcf(string path, IEnumerable topics) - { - Bcf.BcfZipExporter.Save(path, topics, ProjectName); - } - - /// Exports a collection of BCF topics to a stream in BCF 2.1 format. - public void SaveBcf(Stream stream, IEnumerable topics) - { - Bcf.BcfZipExporter.Write(stream, topics, ProjectName); - } - - /// - /// Runs model validation and exports any detected errors or warnings as a BCF 2.1 archive (.bcfzip) - /// with affected element GUIDs linked for cross-discipline issue coordination. - /// - public void ExportValidationBcf(string path) - { - var result = Validate(); - var topics = new List(); - - foreach (var err in result.Errors) - { - var topic = new Bcf.BcfTopic( - title: $"Validation Error: {err.RuleId}", - description: err.Message, - topicType: "Error", - priority: "High"); - - string? targetGuid = err.GlobalId; - if (string.IsNullOrEmpty(targetGuid) && err.ElementId.HasValue) - { - var elem = AllElements.FirstOrDefault(e => e.Id == err.ElementId.Value); - if (elem is not null) targetGuid = elem.GlobalId; - else - { - var sp = AllSpaces.FirstOrDefault(s => s.Id == err.ElementId.Value); - if (sp is not null) targetGuid = sp.GlobalId; - } - } - - if (!string.IsNullOrEmpty(targetGuid)) - { - var vp = new Bcf.BcfViewpoint(); - vp.SelectedElementGuids.Add(targetGuid); - topic.Viewpoints.Add(vp); - } - topics.Add(topic); - } - - foreach (var warn in result.Warnings) - { - var topic = new Bcf.BcfTopic( - title: $"Validation Warning: {warn.RuleId}", - description: warn.Message, - topicType: "Warning", - priority: "Normal"); - - string? targetGuid = warn.GlobalId; - if (string.IsNullOrEmpty(targetGuid) && warn.ElementId.HasValue) - { - var elem = AllElements.FirstOrDefault(e => e.Id == warn.ElementId.Value); - if (elem is not null) targetGuid = elem.GlobalId; - else - { - var sp = AllSpaces.FirstOrDefault(s => s.Id == warn.ElementId.Value); - if (sp is not null) targetGuid = sp.GlobalId; - } - } - - if (!string.IsNullOrEmpty(targetGuid)) - { - var vp = new Bcf.BcfViewpoint(); - vp.SelectedElementGuids.Add(targetGuid); - topic.Viewpoints.Add(vp); - } - topics.Add(topic); - } - - SaveBcf(path, topics); - } - - /// Loads BCF topics from a BCF 2.1 zip archive (.bcfzip). - public static List LoadBcf(string path) => Bcf.BcfZipExporter.Open(path); - /// Validates the model against buildingSMART MVD and geometric integrity rules. public Validation.IfcValidationResult Validate() => Validation.IfcValidator.Validate(this); @@ -763,42 +666,6 @@ public void Save(Stream stream, string fileName = "model.ifc") Save(writer, fileName); } - /// Exports the model to binary glTF 2.0 (.glb) format. - public void SaveGlb(string path) => IfcGlbExporter.Save(this, path); - - /// Exports the model to binary glTF 2.0 (.glb) stream. - public void SaveGlb(Stream stream) => IfcGlbExporter.Write(this, stream); - - /// Exports the model to Wavefront OBJ format (.obj + .mtl). - public void SaveObj(string path) => IfcObjExporter.Save(this, path); - - /// Performs geometric clash detection between this model and another IFC model. - public Clash.IfcClashReport DetectClashes(IfcModel otherModel, Clash.IfcClashOptions? options = null) => - Clash.IfcClashDetector.DetectClashes(this, otherModel, options); - - /// Performs geometric self-clash detection within this IFC model. - public Clash.IfcClashReport DetectClashes(Clash.IfcClashOptions? options = null) => - Clash.IfcClashDetector.DetectClashes(this, options); - - /// Compares this baseline model against a revision model, detecting added, deleted, and modified elements. - public Diff.IfcDiffReport Compare(IfcModel revisionModel, Diff.IfcDiffOptions? options = null) => - Diff.IfcDiffEngine.Compare(this, revisionModel, options); - - /// Exports the model to a standalone, interactive 3D WebGL HTML viewer (.html) with zero dependencies. - public void SaveHtmlViewer(string path, Exporters.IfcHtmlViewerOptions? options = null) => - Exporters.IfcHtmlViewerExporter.Save(path, this, options); - - /// Populates grid location tags across elements in this model using the attached or extracted grid system. - public int AssignGridLocations(Grids.IfcGridSystem? gridSystem = null) - { - var grids = gridSystem ?? GridSystem ?? ExtractGridSystem(); - GridSystem = grids; - return grids.AssignGridLocations(this); - } - - /// Automatically extracts grid axes from IFCGRID elements or metadata in this model. - public Grids.IfcGridSystem ExtractGridSystem() => Grids.IfcGridSystem.ExtractFromModel(this); - /// Serializes the IFC model to an ISO 10303-21 STEP physical string. public string ToStepString(string fileName = "model.ifc") { diff --git a/src/IfcIO/Validation/Ids/IfcIdsReport.cs b/src/IfcIO/Validation/Ids/IfcIdsReport.cs index f1158bc..3e0a837 100644 --- a/src/IfcIO/Validation/Ids/IfcIdsReport.cs +++ b/src/IfcIO/Validation/Ids/IfcIdsReport.cs @@ -1,5 +1,3 @@ -using IfcIO.Bcf; - namespace IfcIO.Validation.Ids; /// @@ -19,7 +17,7 @@ public sealed record IfcIdsFailure /// /// Comprehensive validation audit report produced by evaluating a model against buildingSMART IDS 1.0 rules. /// -public sealed class IfcIdsValidationReport +public sealed partial class IfcIdsValidationReport { public string Title { get; init; } = "IDS Compliance Audit"; public string? IdsVersion { get; init; } = "1.0"; @@ -35,37 +33,4 @@ public sealed class IfcIdsValidationReport public bool IsPassed => IsCompliant; public List Failures { get; } = []; - - /// - /// Exports all IDS compliance failures directly to a buildingSMART BCF 2.1 zip archive (.bcfzip) - /// for issue tracking and resolution in Revit, Solibri, and BIMcollab. - /// - public void SaveBcf(string path) - { - ArgumentNullException.ThrowIfNull(path); - - var topics = new List(); - foreach (var failure in Failures) - { - var topic = new BcfTopic - { - Title = $"[IDS Violation] {failure.SpecificationName}: {failure.ElementType} #{failure.ElementId}", - Description = $"{failure.Message} (Element: '{failure.ElementName}', GUID: {failure.ElementGuid ?? "N/A"})", - TopicType = "Compliance", - TopicStatus = "Active", - CreationAuthor = Author ?? "IfcIO IDS Validator", - }; - - if (!string.IsNullOrEmpty(failure.ElementGuid)) - { - var vp = new BcfViewpoint(); - vp.SelectedElementGuids.Add(failure.ElementGuid); - topic.Viewpoints.Add(vp); - } - - topics.Add(topic); - } - - BcfZipExporter.Save(path, topics, Title); - } }