mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
ifcviewer: rename sidecar transfer/record types; drop unused element hierarchy (sidecar v17)
Rename the streamer/sidecar transfer and record types to describe what they are rather than how they move: MeshChunk -> StreamedMesh InstanceChunk -> StreamedInstance InstanceCpu -> InstanceInfo PackedElementInfo -> ElementTableRecord uploadMeshChunk -> uploadStreamedMesh uploadInstanceChunk -> uploadStreamedInstance buildMeshChunk -> buildStreamedMesh and the two post-index sidecar metadata blocks: "critical" metadata -> "geometry" metadata (meshes/instances/georef/TOC) "deferred" metadata -> "element" metadata (elements + string table) parseSidecarCritical -> parseSidecarGeometryMetadata parseSidecarDeferred -> parseSidecarElementMetadata The one behavioural change: the element hierarchy (parent_id) was carried through ElementInfo, ElementTableRecord, and the sidecar element table but never consumed, so drop it and bump SIDECAR_VERSION 16 -> 17. No back-compat: regenerate sidecars. sample.ifcview is regenerated at v17. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -88,7 +88,7 @@ void reorderSidecarByMorton(SidecarData& sd) {
|
||||
std::vector<std::uint8_t> new_vertices; new_vertices.reserve(sd.vertices.size());
|
||||
std::vector<std::uint32_t> new_indices; new_indices.reserve(sd.indices.size());
|
||||
std::vector<MeshInfo> new_meshes(mesh_count);
|
||||
std::vector<InstanceCpu> new_instances; new_instances.reserve(sd.instances.size());
|
||||
std::vector<InstanceInfo> new_instances; new_instances.reserve(sd.instances.size());
|
||||
|
||||
// Pass A: vertices + LOD0 indices + instances, mesh-by-mesh in the new
|
||||
// order, recording the new offsets on each MeshInfo.
|
||||
@@ -112,7 +112,7 @@ void reorderSidecarByMorton(SidecarData& sd) {
|
||||
new_mesh_info.first_instance = std::uint32_t(new_instances.size());
|
||||
new_mesh_info.instance_count = std::uint32_t(insts_by_mesh[old].size());
|
||||
for (std::uint32_t instance_index : insts_by_mesh[old]) {
|
||||
InstanceCpu instance = sd.instances[instance_index];
|
||||
InstanceInfo instance = sd.instances[instance_index];
|
||||
instance.mesh_id = new_mesh_index;
|
||||
new_instances.push_back(instance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user