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 .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: bug

**IOViewer version** (`ioviewer --version` or the package version):

**Input format** (`.glb`, `.obj`, `.json` or a `ViewerDocument` built in code):
**Input format** (`.glb`, `.obj`, `.json`, `.ifc`, `.ifczip`, `.rvt`, or a `SceneDocument` or `ViewerDocument` built in code):

**Browser and operating system** (for problems in the generated viewer):

Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ API between minor releases.

## [Unreleased]

## [0.3.0] - 2026-11-13

Version 0.3.0 builds the viewer on the scene model of the [IOScene](https://github.com/IOExtend/IOScene) package
(`IOScene` `[0.1.0-preview.2, 0.2.0-0)`, a new dependency of the `IOViewer` package). This is a breaking change of the
(`IOScene` `[0.1.0, 0.2.0-0.0)`, a new dependency of the `IOViewer` package). This is a breaking change of the
library API. What breaks for existing users:

1. The model types move to namespace `IOScene` with `Scene*` names, `ViewerClash*` included; `doc.Elements` becomes
Expand Down Expand Up @@ -71,6 +73,12 @@ the `IOViewer` package). The `IOViewer.Cli` tool only gains inputs.
- The HTML viewer shows `SceneElement.SourceId`, the element's id in its source format (such as a Revit UniqueId or an
IFC GlobalId), as its own row in the properties panel ("Source ID" / "ID источника"), and the model tree search finds
it. It is written to the page's element list only when set.
- The `ioviewer` tool reads IFC (`.ifc`, `.ifczip`) through `IfcIO.Scene` 0.11.1 and Revit (`.rvt`) through
`RvtIO.Scene` 0.4.0. The model key is the file name; the title is the IFC project name, or the Revit file name. What
the engine could not convert (such as an element without geometry) is printed to standard error as one warning or
error per kind with its count. When the engine reported an error (elements may be missing), the requested output
(the page, the JSON or both) is still written and the tool exits with code 4. The `IOViewer` library still references no engine; only the `IOViewer.Cli` tool
package ships IfcIO, RvtIO and their dependencies (see `THIRD-PARTY-NOTICES.md`).

### Changed
- `JsonViewerExporter` writes viewer JSON format 2: `{ "Kind": "ioviewer", "Format": 2, "Scene", "SectionPlanes",
Expand Down
26 changes: 16 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,24 @@ The repository ships no customer models.
### Local feed for unpublished packages

The model data comes from the `IOScene` package. `Directory.Packages.props`
references it with a range such as `[0.1.0-preview.1, 0.2.0-0)`: a patch of
IOScene is additive and a minor is breaking. NuGet restores the lowest version
in the range that it finds.

To build against an IOScene version that is not on nuget.org yet (an IOScene
preview, or the lower bound itself before it is published), pack IOScene into
a local folder and pass that folder:
references it with a range such as `[0.1.0, 0.2.0-0.0)`: a patch of IOScene
adds or fixes and a minor is breaking, and the `-0.0` keeps out the previews of
the next minor (nuget.org refuses the shorter bound `-0` in a dependency). NuGet
restores the lowest version in the range that it finds.

To build against an IOScene version that is not on nuget.org yet, start the
range at that version (for a new minor, move the upper bound too, for example
`[0.2.0-preview.1, 0.3.0-0.0)`, and raise `IfcIO.Scene` and `RvtIO.Scene` to
versions built on that minor: IfcIO.Scene 0.11.1 and RvtIO.Scene 0.4.0 accept
only IOScene `[0.1.0, 0.2.0-0.0)`), pack IOScene into a local folder and pass
that folder:

```sh
dotnet build IOViewer.slnx -c Release -p:RestoreAdditionalProjectSources=<local-feed>
dotnet test IOViewer.slnx -c Release --no-build
```

For a newer preview, also raise the lower bound of the range to it. Once a
restore has put the package in the NuGet global packages folder, later
Once a restore has put the package in the NuGet global packages folder, later
restores, `dotnet run` of the tools and `npm run e2e` find it there. Do not
commit a `nuget.config` that points to a local feed, and commit a lower bound
only when that version is on nuget.org: until then, restoring the solution
Expand Down Expand Up @@ -131,7 +134,10 @@ Push a tag matching the package version, such as `v0.2.0`, to run `release.yml`.
The workflow builds and tests the solution, publishes the NuGet packages through Trusted Publishing, and then attaches
packages, symbols, source and checksums to a GitHub release, marked as a prerelease when the version has a hyphen
(`v0.3.0-preview.1`). The release notes are the section of `CHANGELOG.md` for the version, so add that section before
the tag; the workflow stops before publishing when it is missing.
the tag; the workflow stops before publishing when it is missing. `tools/pack-release.ps1` also stops it when the
`IOViewer` package would depend on a missing or preview IOScene lower bound, or on a dependency bound that nuget.org
refuses (a bound with metadata, or a prerelease label of one part that does not start with a letter).
Before the tag, run the Revit test with a real Revit 2022 file, which CI does not have: set `IOVIEWER_RVT_FILE` to its path and run `dotnet test IOViewer.slnx -c Release --filter Cli_ConvertRvtToHtml`.
The NuGet policy must name this repository, `release.yml`, the configured NuGet profile and the `IOViewer*` package pattern.

## Licensing contributions
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>0.3.0-preview.1</Version>
<Version>0.3.0</Version>
<Authors>mahach666</Authors>
<Copyright>Copyright (c) 2026 mahach666</Copyright>
<Product>IOViewer</Product>
Expand Down
7 changes: 5 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<!-- Patch = additive, minor = breaking while IOScene is 0.x; the -0 keeps out previews of the next breaking line. -->
<PackageVersion Include="IOScene" Version="[0.1.0-preview.2, 0.2.0-0)" />
<!-- Patch = adds or fixes, minor = breaking while IOScene is 0.x; the -0.0 keeps out previews of the next breaking line
(nuget.org refuses the shorter bound -0 in a dependency). -->
<PackageVersion Include="IOScene" Version="[0.1.0, 0.2.0-0.0)" />
<PackageVersion Include="IfcIO.Scene" Version="0.11.1" />
<PackageVersion Include="RvtIO.Scene" Version="0.4.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![Platform](https://img.shields.io/badge/.NET-8.0%20%7C%2010.0-512BD4?style=flat-square&logo=dotnet)](https://dotnet.microsoft.com/)

IOViewer is a fast, 100% managed .NET library and command line tool that generates standalone interactive 3D WebGL / HTML BIM & CAD model viewers from code, glTF/GLB, Wavefront OBJ, or JSON. Geometry read by sibling libraries ([RvtIO](https://github.com/IOExtend/RvtIO), [IfcIO](https://github.com/IOExtend/IfcIO), and [NwcIO](https://github.com/IOExtend/NwcIO)) can be passed in by building a `SceneDocument` in code. The scene model comes from the [IOScene](https://github.com/IOExtend/IOScene) package; IOViewer has no direct dependency on the format libraries.
IOViewer is a fast, 100% managed .NET library and command line tool that generates standalone interactive 3D WebGL / HTML BIM & CAD model viewers from code, glTF/GLB, Wavefront OBJ, or JSON. Geometry read by sibling libraries ([RvtIO](https://github.com/IOExtend/RvtIO), [IfcIO](https://github.com/IOExtend/IfcIO), and [NwcIO](https://github.com/IOExtend/NwcIO)) can be passed in by building a `SceneDocument` in code, and the `ioviewer` command line tool reads IFC and Revit files directly through IfcIO and RvtIO. The scene model comes from the [IOScene](https://github.com/IOExtend/IOScene) package; the IOViewer library has no dependency on the format libraries.

The generated HTML is a single file with no external dependencies that works offline: it opens from disk (`file://`) in a current browser with WebGL 2 and makes no network requests. The viewer is built on [three.js](https://threejs.org/), which is embedded in the file (see [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md)).

Expand Down Expand Up @@ -64,7 +64,7 @@ Add the library to a .NET project:
dotnet add package IOViewer
```

The library examples below are for 0.3.0, which builds on the IOScene scene model and is in preview; 0.2.0 has the
The library examples below are for 0.3.0, which builds on the IOScene scene model; 0.2.0 has the
earlier model, and [CHANGELOG.md](CHANGELOG.md) lists how its types map to the new ones.

The library targets .NET 8 and .NET 10. It uses managed code without native dependencies or Windows-only APIs and supports Windows, Linux, and macOS.
Expand All @@ -80,6 +80,10 @@ ioviewer model.glb -o viewer.html
# Convert Wavefront OBJ model to interactive HTML viewer
ioviewer model.obj -o viewer.html

# Convert an IFC model (.ifc or .ifczip, read with IfcIO) or a Revit model (.rvt, read with RvtIO)
ioviewer model.ifc
ioviewer model.rvt -o viewer.html

# Convert and immediately preview in default web browser via built-in HTTP server
ioviewer model.glb --serve
```
Expand All @@ -91,7 +95,9 @@ Export structured JSON snapshots:
ioviewer model.glb -o model.json
```

Diagnostics and progress go to standard error. Run `ioviewer --help` for the full list of options.
Diagnostics and progress go to standard error, including what IfcIO or RvtIO could not convert (one warning or error
per kind, with its count). When the engine reported an error, elements may be missing: the output is still written and
the exit code is 4. Run `ioviewer --help` for the full list of options and exit codes.

## Library

Expand Down
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ is credited unless you prefer otherwise.
IOViewer reads files that can come from untrusted sources and writes HTML that is opened in a browser. Problems that
matter most:

- crashes, hangs or unbounded memory use caused by a crafted `.glb`, `.obj` or `.json` file;
- crashes, hangs or unbounded memory use caused by a crafted `.glb`, `.obj`, `.json`, `.ifc`, `.ifczip` or `.rvt` file
(the CLI reads IFC and Revit files through IfcIO and RvtIO);
- script injection into the generated HTML through model names, properties or other text taken from the input;
- writing files outside the path a command was given;
- the `--serve` preview server exposing files other than the generated viewer, or listening beyond the local machine;
Expand Down
44 changes: 44 additions & 0 deletions THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,47 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

## IOViewer.Cli tool package

The `IOViewer.Cli` tool package reads IFC and Revit files through the engine adapters, so besides `IOViewer` and
`IOScene` (MIT, copyright (c) 2026 mahach666) it ships the assemblies listed below. The `IOViewer` library package
references none of them.

| Component | Use | License |
|---|---|---|
| [IfcIO](https://github.com/IOExtend/IfcIO) 0.11.1 and IfcIO.Scene 0.11.1 | read IFC files into a scene | MIT, copyright (c) 2026 IfcIO contributors |
| [RvtIO](https://github.com/IOExtend/RvtIO) 0.4.0 and RvtIO.Scene 0.4.0 | read Revit files into a scene | MIT, copyright (c) 2026 mahach666 |
| .NET runtime libraries (DeflateManaged sources, compiled into RvtIO) | managed inflate implementation adapted for tolerant decoding | MIT, copyright (c) .NET Foundation and Contributors |
| [OpenMcdf](https://github.com/openmcdf/openmcdf) 3.4.0, used by RvtIO | reads the compound file container of Revit files | MPL-2.0, copyright (c) 2010-2026 Federico Blaseotto, Jeremy Powell |
| [SharpZipLib](https://github.com/icsharpcode/SharpZipLib) 1.4.2, used by RvtIO | stream decompression | MIT, copyright (c) 2000-2022 SharpZipLib Contributors |

OpenMcdf is distributed unmodified under the Mozilla Public License 2.0 (<https://mozilla.org/MPL/2.0/>); its source
code is available at <https://github.com/openmcdf/openmcdf>.

The MIT-licensed components above are distributed under the following terms, each with the copyright line given in the
table:

```text
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

buildingSMART and IFC are registered trademarks or standards of buildingSMART International Ltd.; IfcIO is an
independent implementation of the IFC schemas. Autodesk and Revit are trademarks of Autodesk, Inc.; RvtIO is not
affiliated with, endorsed by or sponsored by Autodesk.
8 changes: 7 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ dotnet add package IOViewer

## Command line usage

Convert any glTF 2.0 Binary (`.glb`) or Wavefront OBJ (`.obj`) into a self-contained 3D HTML viewer:
Convert any glTF 2.0 Binary (`.glb`), Wavefront OBJ (`.obj`), IFC (`.ifc`, `.ifczip`, read with IfcIO) or Revit
(`.rvt`, read with RvtIO) model into a self-contained 3D HTML viewer:

```sh
# Convert 3D model into an interactive standalone HTML viewer
ioviewer model.glb -o viewer.html

# IFC and Revit models; what the engine could not convert is printed as warnings or errors on standard error,
# and an error (elements may be missing) gives exit code 4 after the output is written
ioviewer model.ifc
ioviewer model.rvt

# Launch local preview server and open in default browser
ioviewer model.glb --serve
```
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: IOViewer

# IOViewer

**IOViewer** is a fast, 100% managed .NET library and CLI tool for generating standalone interactive 3D WebGL / HTML BIM & CAD model viewers directly from code or file formats (glTF/GLB, Wavefront OBJ, and JSON).
**IOViewer** is a fast, 100% managed .NET library and CLI tool for generating standalone interactive 3D WebGL / HTML BIM & CAD model viewers directly from code or file formats (glTF/GLB, Wavefront OBJ and JSON; the CLI tool also reads IFC and Revit files through IfcIO and RvtIO).

The generated HTML is a single file with no external dependencies that works offline: it opens from disk in a current browser with WebGL 2, without servers, plug-ins or network requests. The viewer is built on three.js, embedded in the file.

Expand All @@ -24,7 +24,7 @@ The generated HTML is a single file with no external dependencies that works off

- [Getting started](getting-started.md): install the package or CLI tool and generate your first 3D viewer.
- [Public API](public-api.md): supported surface and key entry points of the library.
- [Third-party notices](https://github.com/IOExtend/IOViewer/blob/main/THIRD-PARTY-NOTICES.md): the three.js license.
- [Third-party notices](https://github.com/IOExtend/IOViewer/blob/main/THIRD-PARTY-NOTICES.md): the three.js license and the components the command line tool ships.
- [Source on GitHub](https://github.com/IOExtend/IOViewer) and [DeepWiki](https://deepwiki.com/IOExtend/IOViewer) for an automatically generated overview of the repository.

IOViewer is not affiliated with, endorsed by or sponsored by Autodesk. Autodesk, Revit, Navisworks, ViewCube and TimeLiner are trademarks of Autodesk, Inc.
5 changes: 5 additions & 0 deletions src/IOViewer.Cli/IOViewer.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
<!-- A low, moderate or high advisory against a dependency of an engine must not stop the release of the viewer;
a critical one (NU1904) still fails the build, since the engines parse untrusted files. -->
<WarningsNotAsErrors>NU1901;NU1902;NU1903</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IOViewer\IOViewer.csproj" />
<PackageReference Include="IfcIO.Scene" />
<PackageReference Include="RvtIO.Scene" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading