From d0d7bdc3afa6416c3d5c5845b04e615a06cfbaf2 Mon Sep 17 00:00:00 2001 From: atxcreatech Date: Sun, 15 Feb 2026 21:07:49 -0600 Subject: [PATCH] Fix: Skip non-vertex PLY elements instead of throwing PLY files from tools like ml-sharp include extra metadata elements (extrinsic, intrinsic, image_size, frame, etc.) alongside vertex data. The reader was throwing unsupportedFileContents when encountering these non-vertex elements. Changed to skip them with `continue` instead. Co-Authored-By: Claude Opus 4.6 --- SplatIO/Sources/SplatPLYSceneReader.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SplatIO/Sources/SplatPLYSceneReader.swift b/SplatIO/Sources/SplatPLYSceneReader.swift index 7013434b..3ce778e8 100644 --- a/SplatIO/Sources/SplatPLYSceneReader.swift +++ b/SplatIO/Sources/SplatPLYSceneReader.swift @@ -48,9 +48,9 @@ public class SplatPLYSceneReader: SplatSceneReader { for try await plyStreamElementSeries in plyStream { var pointCount = 0 + // Skip non-vertex element types (e.g. face, extrinsic, intrinsic metadata) guard plyStreamElementSeries.typeIndex == elementMapping.elementTypeIndex else { - continuation.finish(throwing: Error.unsupportedFileContents("Expected type index \(elementMapping.elementTypeIndex), found \(plyStreamElementSeries.typeIndex)")) - return + continue } do {