Bladeren bron

fix ValidFeatureIdAttributeWithLargerFeatureCount

Bert Temme 1 jaar geleden
bovenliggende
commit
85f792bb9e

+ 2 - 1
src/SharpGLTF.Ext.3DTiles/Schema2/Ext.Features.cs

@@ -334,7 +334,8 @@ namespace SharpGLTF.Schema2
                         }
 
                         var count = distinctFeatureIds.Count();
-                        Guard.IsTrue(featureId.FeatureCount == count, $"Mismatch between FeatureCount ({featureId.FeatureCount}) and Feature Attribute ({count})");
+                        // FeatureCount must be greater or equal to the number of distinct feature ids
+                        Guard.IsTrue(featureId.FeatureCount >= count, $"Mismatch between FeatureCount ({featureId.FeatureCount}) and Feature Attribute ({count})");
                     }
                     var texture = featureId.GetTexture();
                     if (texture != null)

+ 0 - 3
tests/SharpGLTF.Cesium.Tests/SharpGLTF.Cesium.Tests.csproj

@@ -35,9 +35,6 @@
   </ItemGroup>
 
   <ItemGroup>
-    <None Update="testfixtures\meshFeatures\ValidFeatureIdAttributeWithLargerFeatureCount.gltf">
-      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
-    </None>
     <None Update="tree.glb">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>