Repository navigation
Releases
Releases · IOExtend/DwgIO
DwgIO v0.4.0
Added
- Entity decoding: common entity data (extended data chain, graphics preview, entity mode, reactors, colour,
linetype scale, visual styles, invisibility, lineweight) and geometry bodies for LINE, CIRCLE, ARC and POINT. DwgDocument.Entities: decoded entities with geometry; exposed in the JSON export
and indwgio inspect(entity-kind counts and sample coordinates).- Bit-packed primitives: packed 32- and 64-bit integers, packed doubles, doubles stored as a patch of a default
value, unpacked doubles and single bits; corrected the 2-bit tags of packed shorts (tag 11 = 256) and packed
integers (tag 00 = full 32-bit value). - Banner and logo redrawn.
- Contributing guide, security policy, code of conduct, issue and pull request templates, Dependabot configuration
and a description of the private test fixtures (docs/test-fixtures.md). - Documentation site built with docfx: getting started, public API and the generated API reference.
Changed (breaking)
- Only the types listed in
docs/public-api.mdare public. The container reader, cipher, checksums, decompressor,
bit reader and section parsers underDwgIO.Internalare nowinternal, and so are theParsemethods of the
header and handle map types andDwgVersionInfo.FromMagic. - The file header, container header, handle map and object types moved to
DwgIO.Model, and the JSON exporter and
its options toDwgIO.Json.DwgDocument.CommonHeaderis nowFileHeaderandDwgDocument.Headeris now
ContainerHeader. - Property names of the header, handle map and section types and the matching JSON export keys changed to clearer
names; the current names are listed indocs/public-api.mdand the generated API reference. - The JSON
typevalue andDwgEntity.TypeNameuse AutoCAD entity names for 3D faces, 3D solids, 2D and 3D
polylines and vertices, and table names for block records, layers, text styles and linetypes.
Changed
- The NuGet package icon lives in each project folder (
src/DwgIO/icon.png,src/DwgIO.Cli/icon.png). - Tests that need real drawings are reported as skipped, with a reason, when no drawing is available, instead of
passing without running. THIRD-PARTY-NOTICES.mdcarries the Autodesk trademark notice and is included in the NuGet packages.- README and changelog describe the file format in the project's own words.
- CLI help lists the
previewcommand; error messages no longer cite external documents. - Fixture tests look for drawings in
DWGIO_TEST_FILESand in atest_filesfolder (each folder and one level of
subfolders) and run on .NET 8 as well as .NET 10. - Packages include Source Link.
Fixed
- Crafted files can no longer cause huge allocations, integer overflow in bounds checks or crashes with exceptions
other thanDwgException: declared section sizes are checked against their page count, page size and the largest
array before allocation; each page is limited to the section's page size; section buffers and decompressed pages of
one document together are limited to 8 GiB; section-map entry and page counts are checked against the map before lists are sized; preview
image ranges, page payload sizes and SummaryInfo dates are range-checked; pages past the section end are no longer
decompressed; page checksums are computed only whenVerifyChecksumsis set. - The decompressor no longer reads a stale buffer when the output grows during an overlapping back-reference, and it
presizes its output only up to 1 MiB instead of trusting the size declared in the file. DwgDocument.OpenandReadSectionreport malformed data asDwgException(with the original exception as
InnerException), and the best-effort section readers record such failures inDiagnostics.
Known limitations
- Some entity bodies are not decoded yet; they are recorded in
DwgDocument.Diagnostics.