From ba1ff2f66556e65ae05910446c6d6c3b0cbd59ff Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Mon, 16 Oct 2023 16:01:55 +0200 Subject: [PATCH 1/3] Change geometric error inconsistency severity level --- CHANGES.md | 1 + src/issues/SemanticValidationIssues.ts | 4 ++-- src/validation/TilesetTraversingValidator.ts | 13 +++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3a03f855..575c96d0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ Version ?.?.? - 2023-mm-dd - When an I3DM refers to an external glTF asset with a URI, then the URI has to be padded with `0x20` (space) bytes if necessary to satisfy the alignment requirements. The validator only accepted `0x00` (zero) bytes as padding bytes. Now the validator properly handles trailing spaces, and reports the presence of zero-bytes with a validation warning ([#276](https://github.com/CesiumGS/3d-tiles-validator/issues/276)) +- The case that the `geometricError` of a tile was larger than the `geometricError` of its parent was reported as an `ERROR`. The specification does not explicitly disallow this, so it is now only treated as a `WARNING` ([#286](https://github.com/CesiumGS/3d-tiles-validator/issues/286)) Version 0.4.1 - 2023-05-02 diff --git a/src/issues/SemanticValidationIssues.ts b/src/issues/SemanticValidationIssues.ts index 9f964d0a..1bc9f09e 100644 --- a/src/issues/SemanticValidationIssues.ts +++ b/src/issues/SemanticValidationIssues.ts @@ -120,7 +120,7 @@ export class SemanticValidationIssues { } /** - * Indicates that the geometric error of a tile was larger than + * Indicates a warning that the geometric error of a tile was larger than * the geometric error of its parent. * * @param path - The path for the `ValidationIssue` @@ -129,7 +129,7 @@ export class SemanticValidationIssues { */ static TILE_GEOMETRIC_ERRORS_INCONSISTENT(path: string, message: string) { const type = "TILE_GEOMETRIC_ERRORS_INCONSISTENT"; - const severity = ValidationIssueSeverity.ERROR; + const severity = ValidationIssueSeverity.WARNING; const issue = new ValidationIssue(type, path, message, severity); return issue; } diff --git a/src/validation/TilesetTraversingValidator.ts b/src/validation/TilesetTraversingValidator.ts index 684d8a23..1df2a494 100644 --- a/src/validation/TilesetTraversingValidator.ts +++ b/src/validation/TilesetTraversingValidator.ts @@ -386,8 +386,9 @@ export class TilesetTraversingValidator { /** * Validate the consistency of the given traversed tile instances. * - * This will check the conditions that must hold for parent/child - * tiles, for example, the consistency of the geometric error + * This will check whether the geometric error of the tile + * is larger than the geometric error of its parent, and + * create a warning if this is not the case. * * @param traversedParent - The parent `TraversedTile` * @param traversedTile - The current `TraversedTile` @@ -402,8 +403,8 @@ export class TilesetTraversingValidator { const tile = traversedTile.asRawTile(); const parent = traversedParent.asRawTile(); - // Validate that the parent geometricError is not larger - // than the tile geometricError + // Create a warning when the geometric error of the tile + // is larger than the geometric error of its parent const parentGeometricError = parent.geometricError; const tileGeometricError = tile.geometricError; if ( @@ -420,9 +421,9 @@ export class TilesetTraversingValidator { message ); context.addIssue(issue); - return false; } - + // The geometric error inconsistency is only a WARNING, + // so the tile is still considered to be valid return true; } } From 902dfd20e9be572398fa5c1197c47ac03789f1b0 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Mon, 16 Oct 2023 16:02:50 +0200 Subject: [PATCH 2/3] Pin 3d-tiles-tools dependency to 0.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba3ef15c..af46bdae 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "3d-tiles-validator": "./build/main" }, "dependencies": { - "3d-tiles-tools": "^0.3.0", + "3d-tiles-tools": "0.3.0", "cesium": "^1.97.0", "gltf-validator": "^2.0.0-dev.3.9", "minimatch": "^5.1.0", From a7a974fced7ecea7e4c7c93663dcedb9123a10a3 Mon Sep 17 00:00:00 2001 From: Marco Hutter Date: Mon, 16 Oct 2023 16:10:34 +0200 Subject: [PATCH 3/3] Pin 3d-tiles-tools to 0.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77dbde78..78caf782 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@gltf-transform/core": "^3.2.1", "@gltf-transform/extensions": "^3.2.1", "@gltf-transform/functions": "^3.2.1", - "3d-tiles-tools": "0.3.0", + "3d-tiles-tools": "0.3.1", "cesium": "^1.97.0", "gltf-validator": "^2.0.0-dev.3.9", "minimatch": "^5.1.0",