Add geometry database (.rdbview) export to IfcViewerFull

Wire a new "Export Geometry Database" tool button in AddModelDialog,
adjacent to "Convert IFC File to Database", to produce a zipped
read-only artifact combining a lossy RDB (with IfcRepresentationItem
stripped) and a .ifcview geometry sidecar. Intended for cloud
coordination workflows where parametric geometry editing is not needed.

Pipeline changes to support this:

- document_serializer_context gains a `skip_supertypes` field; the
  rdb plugin forwards it to RocksDbSerializer so the same registry
  path produces full or lossy RDBs.

- Vertex quantization helpers (octEncodeNormal + quantizeVertex) move
  out of ViewportWindow.cpp into a shared header so the sidecar's
  byte layout stays identical regardless of whether it came from a
  GPU readback or a CPU pipeline.

- New HeadlessSidecarBuilder runs a GeometryStreamer on the calling
  thread, captures MeshChunk/InstanceChunk into a SidecarData on the
  CPU, then computes georef + packed elements + LODs and writes the
  .ifcview — no ViewportWindow or GL context required.

The Controller's export flow runs RDB conversion + sidecar build +
QZipWriter packaging on a background QThread, writing through
`<dest>.tmp` then renaming for atomic appearance in cloud-sync
folders. ifcviewer-full now links Qt6::CorePrivate for QZipWriter.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-05-15 11:54:14 +10:00
parent 56273de443
commit fed739847e
11 changed files with 575 additions and 48 deletions
+2 -1
View File
@@ -21,7 +21,7 @@
message("Running CMakeLists.txt in /src/ifcviewer-full")
set(QT_VERSION 6 CACHE STRING "Qt version")
find_package(Qt${QT_VERSION} COMPONENTS Core Gui Widgets Svg REQUIRED PATHS ${QT_DIR})
find_package(Qt${QT_VERSION} COMPONENTS Core CorePrivate Gui Widgets Svg REQUIRED PATHS ${QT_DIR})
set(IFCVIEWER_FULL_FILES
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
@@ -99,6 +99,7 @@ set_target_properties(IfcViewerFull PROPERTIES
target_link_libraries(IfcViewerFull PRIVATE
IfcViewer
Qt${QT_VERSION}::Core
Qt${QT_VERSION}::CorePrivate
Qt${QT_VERSION}::Gui
Qt${QT_VERSION}::Svg
Qt${QT_VERSION}::Widgets