Skip to content

Add integrated 2D CAD mode, native vector lines, text annotations and sheets - #94

Merged
mahach666 merged 3 commits into
mainfrom
feat/cad-2d-lines-and-sheets
Dec 2, 2026
Merged

mahach666 merged 3 commits into
mainfrom
feat/cad-2d-lines-and-sheets

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Summary

  • Native vector lines (SceneTopology.Lines): serialized in binary payloads with local Float32 coordinates (preserving sub-millimetre precision for 1:100 paper sheets), rendered in batched THREE.LineSegments chunks (LineScene), integrated with GPU picking and measure snapping.
  • Integrated 2D toolbar toggle & CAD contrast: added an interactive 2D button on the viewer toolbar (orthographic top-down +Y camera, orbit lock, pan enabled) and adaptive dark/light contrast for ACI 7 monochrome lines and text overlays.
  • Text annotations (ViewerAnnotation): projected HTML text overlay (AnnotationsOverlay) supporting height, rotation, wrapping width, AutoCAD attachment points, per-sheet filtering, and element visibility.
  • Switchable sheets (ViewerSheet): floating bottom-left sheet/space bar (SheetsBar) switching between Paper Space layouts (white paper + extent frame) and Model Space (#14171c dark CAD canvas).

Verification

  • Rebuilt Viewer/dist/viewer.js via esbuild and ran JS unit suite: 194/194 passed (
    ode --test test/unit/*.test.js).
  • Ran dotnet test IOViewer.slnx -c Release (including new LinePayloadTests): 213 passed, 0 failed, 1 skipped (Cli_ConvertRvtToHtml_ReadsTheModelThroughRvtIO) on
    et8.0 and
    et10.0.

@mahach666
mahach666 merged commit 184f51d into main Dec 2, 2026
11 of 12 checks passed
@mahach666 mahach666 mentioned this pull request Dec 2, 2026
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