Skip to content

Commit

Permalink
Merge pull request #287 from CesiumGS/geometric-error-inconsistency-s…
Browse files Browse the repository at this point in the history
…everity

Change geometric error inconsistency severity level
  • Loading branch information
lilleyse authored Oct 16, 2023
2 parents e8a3d3e + a7a974f commit ef6a5dc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.1",
"3d-tiles-tools": "0.3.1",
"cesium": "^1.97.0",
"gltf-validator": "^2.0.0-dev.3.9",
"minimatch": "^5.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/issues/SemanticValidationIssues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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;
}
Expand Down
13 changes: 7 additions & 6 deletions src/validation/TilesetTraversingValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,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`
Expand All @@ -404,8 +405,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 (
Expand All @@ -422,9 +423,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;
}
}

0 comments on commit ef6a5dc

Please sign in to comment.