Repository navigation
Description
Environment: NwcIO 0.18.0 from NuGet, net10.0, .NET SDK 10.0.202, Windows 11 x64.
var doc = NwcDocument.Open(path, NwcReaderOptions.Default); // Strict = false
var geo = NwcDocument.Open(path, new NwcReaderOptions { BuildSceneTree = false });I tested 11 real files from an industrial plant project. They come from several companies and were saved
from Navisworks. 2 files open fully, 3 open only with BuildSceneTree = false, and 6 do not open at all.
Strict = true gives the same errors.
The three errors
| Message | Where | |
|---|---|---|
| E1 | LcOaPartitionProps stream S at byte N: class 70, which this slot does not allow |
scene tree |
| E2 | LcOpNwdLogicalHierarchy at byte N: f64 alignment pad is not zero |
scene tree |
| E3 | LcOpNwdGeometry record N: class is not 94 or 95 at +4 |
geometry |
Files
| File | Type | Size | Format | Loader | Default options | BuildSceneTree = false |
|---|---|---|---|---|---|---|
| A | .nwd | 121 MB | 451 | – | E1, stream 0, byte 8 | opens, geometry only ¹ |
| B | .nwc | 154 MB | 448 | lcldifc |
E1, stream 0, byte 8 | opens, geometry only ¹ |
| C | .nwc | 43 MB | 448 | lcldifc |
E1, stream 0, byte 8 | opens, geometry only ² |
| D | .nwd | 298 MB | 448 | – | E2, byte 816 | E3, record 147 |
| E | .nwd | 56 MB | 448 | – | E1, stream 4, byte 3308644 | E3, record 599 |
| F | .nwd | 9.6 MB | 451 | – | E1, stream 0, byte 8 | E3, record 208 |
| G | .nwd | 9.5 MB | 448 | – | E3, record 12 | E3, record 12 |
| H | .nwd | 21 MB | 455 | – | E1, stream 0, byte 2764 | E3, record 465 |
| I | .nwd | 90 MB | 448 | – | E2, byte 540184 | E3, record 3 |
| OK-1 | .nwd | 77 MB | 448 | – | opens fully ³ | |
| OK-2 | .nwc | 0.5 MB | 448 | lcldstep |
opens fully |
¹ 111 956 meshes, 23.98 M triangles. No mesh is linked to a node.
² 10 130 meshes, 6.08 M triangles. No mesh is linked to a node.
³ 11.3 M triangles, 1 745 elements with IFC GlobalId and properties.
Format and Loader are FileInfo.FormatVersion and FileInfo.LoaderPlugin, read with every Read* option off
and BuildSceneTree = false. That read works for all 11 files.
Top frames of E1, E2, E3
InvalidDataException: LcOaPartitionProps stream 0 at byte 8: class 70, which this slot does not allow
at NwcIO.Internal.Parsing.LcObjectReader.ReadPointer(ReadOnlySpan`1 allowedClasses, Func`2 readBody, Boolean allowNull, Boolean allowBackReference)
at NwcIO.Internal.Parsing.HierarchyParser.Parser.ReadPartitionRoot()
at NwcIO.Internal.Parsing.HierarchyParser.PartitionRoots.Take()
at NwcIO.Internal.Parsing.HierarchyParser.Parser.ReadNode(Int32 classId)
InvalidDataException: LcOpNwdLogicalHierarchy at byte 816: f64 alignment pad is not zero
at NwcIO.Internal.Parsing.LcObjectReader.Align8(String what)
at NwcIO.Internal.Parsing.LcObjectReader.ReadDouble()
at NwcIO.Internal.Parsing.HierarchyParser.Parser.ReadMaterial()
at NwcIO.Internal.Parsing.HierarchyParser.Parser.ReadBody(Int32 classId)
InvalidDataException: LcOpNwdGeometry record 147: class is not 94 or 95 at +4
at NwcIO.Internal.Parsing.GeometrySegmentReader.ReadAsync(IReadOnlyList`1 chunks, LcRawStream toc, CancellationToken cancellationToken)
at NwcIO.Internal.Parsing.ModelGraphReader.ReadAsync(ModelSegments segments, NwcReaderOptions options, String rootName, NwcXRefTable xRefs, CancellationToken cancellationToken)
at NwcIO.NwcDocument.ParseContainer(NwcContainer container, NwcReaderOptions options, Boolean keepStreamCatalog, String fallbackName, IProgress`1 progress, CancellationToken cancellationToken)
The files are confidential client data, so I cannot attach them. I can run a diagnostic build or option on
them and send back output that has no model content: the stream catalog, the class ids and offsets of the
records that fail, or a hex dump of a record header.
Activity
mahach666 commentedon Dec 3, 2026
Hi @SergeyPriem, thanks for offering to run a test build. Could you rerun the same 11 files with the code from #292, using the same two settings as in your report? The PR adds support for class-70 IFC properties and class-96 point geometry. The material alignment error (E2) is still under investigation.
If you prefer the CLI, run this from a clone of NwcIO with .NET SDK 10.0.401 or a later .NET 10 SDK:
Please report which file labels now open with each setting and paste the exception messages for any remaining failures. For E3, the new message includes the actual class ID. For E2, the top few stack frames would help confirm where alignment fails. The models and JSON exports can stay local.
SergeyPriem commentedon Dec 4, 2026
Thank you. I ran all 11 files with the code of #292 (merge commit 83bc312), with the CLI as you wrote,
in both modes. .NET SDK 10.0.404, Windows 11 x64; the repository tests pass on this machine (net10.0).
I also ran a small test program against the same source to get the stack frames, and against main
(d29c91e, with #293). The failing files give the same result from a local copy (same SHA-256), so this
is not a sync or read problem on my side.
Result: 6 of 11 files open fully now (before: 2). A, B, C and F are fixed: the scene tree reads, and
every mesh is linked to a node. D, E, G, H and I still fail in both modes.
With
--no-tree, the geometry now fails on the same record numbers as E3 before (D 147, E 599, H 465,G 12, I 3). In D, E and H the record is class 96 and takes the new point path, but its terminator is not zero.
In G and I the record class is 105.
--no-treeLcOpNwdLogicalHierarchy at byte 816: f64 alignment pad is not zeroLcOpNwdGeometry record 147: point record terminator is not zero at +84LcOpNwdLogicalHierarchy at byte 16998232: string is not valid UTF-8LcOpNwdGeometry record 599: point record terminator is not zero at +60LcOpNwdGeometry record 12: class 105 is not 94, 95 or 96 at +4LcOaPartitionProps stream 0 at byte 510620: property value type 15 is unknownLcOpNwdGeometry record 465: point record terminator is not zero at +60LcOpNwdLogicalHierarchy at byte 540184: f64 alignment pad is not zeroLcOpNwdGeometry record 3: class 105 is not 94, 95 or 96 at +4With main (#293) the results are the same, except file I with default options:
LcOpNwdLogicalHierarchy at byte 543836: back-reference in a slot that needs a new object.Stack frames (#292, default options)
E2, file D (in
ReadMaterial):E2, file I (a different place: the partition trailer, not the material):
File I on main (#293):
File E (UTF-8, also in
ReadMaterial):File H:
All geometry errors (
point record terminator,class 105) come fromGeometrySegmentReader.ReadAsync(GeometrySegmentReader.cs:37).A small request, not a bug. The docs say
NwcNode.IfcGlobalIdis set only on Revit element nodes, and thatis what I see. A, B and C are built from IFC (
lcldifc), and their GlobalId is in the properties:Element / GlobalIdandElement / IfcGUID(43 372 times in A, 7 775 times in C). CouldIfcGlobalIdbefilled from these properties for IFC-built files? We use the GlobalId to link a model element to our
equipment list.
I can run the next build on the same files at any time.