Repository navigation
feat(cli): read IFC and RVT input through IfcIO.Scene and RvtIO.Scene; release 0.3.0 - #28
Merged
Merged
Conversation
The CLI printed every adapter diagnostic other than Info with the prefix "Warning:". Diagnostics are now grouped by severity and code, and a group of Error severity is printed with "Error:".
The OpenMcdf 3.4.0 package names github.com/openmcdf/openmcdf as its repository; the notices pointed to the former location.
IOScene is referenced as [0.1.0, 0.2.0-0.0): nuget.org refuses the bound -0 in a dependency. IfcIO.Scene 0.11.1 and RvtIO.Scene 0.4.0 are the released adapters. Version 0.3.0; the changelog section 0.3.0 takes the entries of [Unreleased]. When an engine adapter reports an error (elements may be missing), ioviewer still writes the requested output and exits with code 4; warnings keep 0. The Revit test expects 4 when an engine error was printed and 0 otherwise. pack-release.ps1 checks the packed packages as the engines' scripts do: the IOViewer package must exist and depend on IOScene with a lower bound that is present and not a preview, and no dependency bound may be one nuget.org refuses. README, CONTRIBUTING, SECURITY, the docs and the bug report template describe the new range, version, exit code and inputs.
mahach666
marked this pull request as ready for review
November 13, 2026 01:51
Adapter diagnostic messages quote element names from the model file. The CLI now replaces control characters (escape sequences, line breaks) with '?' before writing them to standard error, so a crafted file cannot inject terminal sequences or forge an extra "Error:" line. The Revit test takes the expected exit code from the diagnostics of RvtSceneReader instead of parsing standard error. CliTests and ModelAndCliIntegrationTests share the "Console" test collection, so their redirections of the process-wide console no longer race.
…acters Engine exceptions can quote names or tokens from the model file, and the CLI printed them as they were when a load or an export failed. Those messages now go through the same Printable helper as the adapter diagnostics. The helper also replaces format characters (Unicode category Cf, such as the bidirectional overrides U+202E and U+2066), which make a terminal show the line in a different order than it was written.
…packages - IOViewer.Cli keeps NU1904 (a critical advisory) as an error; only low, moderate and high advisories against an engine dependency are warnings, since the engines parse untrusted files. - tools/pack-release.ps1 removes .nupkg and .snupkg files left in the output folder by an earlier run before it packs, so the dependency check and the push see only this version. The checks are named instead of labelled (b) and (c). - Printable walks runes, so format characters above U+FFFF (such as the invisible tag characters) are replaced too. - The usage line lists input.ifczip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes and why
The
ioviewertool reads IFC (.ifc,.ifczip) and Revit (.rvt) models through the engine adaptersIfcIO.Scene0.11.1 andRvtIO.Scene0.4.0, so a model becomes a viewer without writing code. TheIOViewerlibrary still depends only onIOScene; only theIOViewer.Clitool package references the engines. The last commit prepares the stable release 0.3.0 on the released packages.CLI
.ifc/.ifczipare read withIfcSceneReader.Read,.rvtwithRvtSceneReader.Read; the resultingSceneDocumentis wrapped in aViewerDocument. The usage line,--helpand the unsupported-extension message list the new inputs.Error: read-cut: ... (1 more)). Info entries are not printed.RvtIO.Scene:geometry-undecoded,read-cut,failed-members, which mean that elements may be missing) makes the tool exit with code 4 after it has written the page and the JSON; warnings keep exit code 0. Codes 1 to 3 are unchanged. (The open question of the draft, decided by the maintainer.)WarningsNotAsErrorsNU1901-NU1903 inIOViewer.Cli.csproj: withTreatWarningsAsErrorsand NuGet audit on, a low, moderate or high advisory against a dependency of an engine would otherwise fail the tool build and the release. A critical advisory (NU1904) still fails it, since the engines parse untrusted files.?.Release 0.3.0
## [0.3.0] - 2026-11-13with the entries that were under [Unreleased], and an empty [Unreleased].IOScene[0.1.0, 0.2.0-0.0),IfcIO.Scene0.11.1,RvtIO.Scene0.4.0. The-0.0bound replaces-0, which nuget.org refuses in a dependency (it refusedIfcIO.Scene0.11.0 for it; Recommend a range for IOScene that nuget.org accepts IOScene#3 changed the contract).tools/pack-release.ps1removes packages left in the output folder by an earlier run, then checks the packed packages before anything is published, as the engines do: theIOViewerpackage must exist and depend onIOScenewith a lower bound that exists and is not a preview, and no package may have a dependency bound that nuget.org refuses.docs/getting-started.md,THIRD-PARTY-NOTICES.md(IfcIO 0.11.1): the new range, version and exit code.docs/index.md,SECURITY.md(scope) and the bug report template list the IFC and Revit inputs.Repository (earlier commits of this PR)
THIRD-PARTY-NOTICES.md: a section for the tool package listing IfcIO, RvtIO, the .NET DeflateManaged sources compiled into RvtIO, OpenMcdf 3.4.0 (MPL-2.0) and SharpZipLib 1.4.2, plus buildingSMART and Autodesk trademark lines.docs/getting-started.md,docs/index.mddescribe IFC and RVT input.IOVIEWER_RVT_FILE,--filter Cli_ConvertRvtToHtml), which CI does not have.Tests
In
ModelAndCliIntegrationTests:Cli_ConvertIfcToHtml_ReadsTheModelThroughIfcIO: an IFC2X3 model built in code (wall withPset_WallCommon, unstyled window, proxy with hostile name and property strings) converted to HTML and JSON. Checks exit code 0, empty standard error, model key, title, 3 instances, the wall's properties and GlobalId assourceId, the window's half opacity, and that the hostile string is not written raw into the page.Cli_AdapterDiagnostics_AreReportedOncePerSeverityAndKind: grouping, counts and theError:/Warning:prefixes.Cli_ExitCode_IsFourOnlyWhenTheAdapterReportedAnError: no diagnostics, warnings and info give 0; an error gives 4.Cli_ConvertRvtToHtml_ReadsTheModelThroughRvtIO: runs only whenIOVIEWER_RVT_FILEnames a Revit 2022 file, skipped otherwise; no Revit file is committed. It expects exit code 4 when the tool printed an engine error and 0 otherwise, so the release check works on any Revit file and pins the code end to end.CliTests: the help assertion follows the new usage line.Run with an empty NuGet package folder, so
IOScene0.1.0,IfcIO/IfcIO.Scene0.11.1 andRvtIO/RvtIO.Scene0.4.0 all came from nuget.org:dotnet build IOViewer.slnx -c Release: 0 warnings, 0 errors.dotnet test IOViewer.slnx -c Release: 120 tests on each of net8.0 and net10.0, 119 passed, 1 skipped (the RVT test withoutIOVIEWER_RVT_FILE). WithIOVIEWER_RVT_FILEset to a private Revit 2022 sample the RVT test passed on both TFMs (exit code 0) before the review fixes; since then it takes the expected exit code fromRvtSceneReaderdiagnostics and has not been run again with a Revit file.tools/pack-release.ps1(Windows PowerShell 5.1; the release job uses pwsh): exit 0;IOViewer.0.3.0depends onIOScene[0.1.0, 0.2.0-0.0). Its dependency check, run on its own against crafted packages, passes the released range and a tool package without dependencies, and refuses-0, a preview or missingIOScenelower bound, a missingIOSceneand a bound with metadata.THIRD-PARTY-NOTICES.md.Known limitations (not changed here)
--serve, the tool reaches its exit code only when the preview server fails to start; it then returns 0 (or 4) after printing the server error.After merge
Tag
v0.3.0on the merge commit; the release publishesIOViewerandIOViewer.Cli0.3.0. The CHANGELOG date is 2026-11-13; if the tag is pushed on a later day, the date should be corrected first.