Skip to content

Support blocks, XREFs, Paper Space sheets, viewports and unified IOViewer 2D export - #78

Merged
mahach666 merged 4 commits into
mainfrom
feat/blocks-sheets-and-viewer2d
Dec 2, 2026
Merged

mahach666 merged 4 commits into
mainfrom
feat/blocks-sheets-and-viewer2d

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Depends on IOExtend/IOViewer#94: Once IOViewer#94 is merged and published to NuGet, update IOViewer in Directory.Packages.props from [0.4.3-cad.1] to the published release version before merging this PR so CI restores from nuget.org.

Summary

  • R2018 AcDb:Header fix: aligned ExtMin/ExtMax reading (HeaderParser.cs), fixing 2-bit shift on non-zero ExtMax.Z and restoring INSUNITS decoding without diagnostics.
  • Blocks, XREFs, layouts & complex curves:
    • Decoded BLOCK_RECORD (BlockRecordParser), LAYOUT (LayoutParser), VIEWPORT, INSERT/MINSERT, POLYLINE_2D/VERTEX_2D, POLYLINE_3D/VERTEX_3D and SPLINE (SplineEvaluator).
    • Recursively expanded INSERT/MINSERT blocks (BYBLOCK colour inheritance) and resolved sibling XREF files in DwgSceneReader.
    • Built switchable Paper Space sheets (DwgSceneSheet) with floating VIEWPORT projection and 2D Liang-Barsky clipping, plus TEXT/MTEXT viewport annotations.
  • Unified HTML export via IOViewer:
    • Replaced standalone 2D HTML code (DwgCadHtmlViewer.cs, ViewerMeshGeometry.cs) so all .html exports route through unified IOViewer (2D toolbar toggle, sheets bar, vector lines and annotations).
    • Added DwgViewerMode.Auto (default): automatically opens flat 2D plans and sheet drawings in 2D mode while keeping 3D models in 3D (--mode auto|2d|3d).

Verification

  • dotnet test DwgIO.slnx -c Release (including BlocksAndSheetsTests): 293 passed, 0 failed, 1 skipped (AppInfoHistory_PreservesTheRawSection) on
    et8.0 and
    et10.0.

@mahach666
mahach666 merged commit c86cf52 into main Dec 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant