CesiumGS / CesiumGS/cesium

Dynamic polygons on terrain error with duplicate positions

Open
#6,565 0 comments 0 reactions 0 assignees View on GitHub
category - polygons/geometry type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/KV_HKOCrBWs

Code to duplicate:
```
var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});

var positions = Cesium.Cartesian3.unpackArray([
178357.7526681642, -3986013.8412960134, 4936566.6195444185,
-2354798.5072417534, -4447471.461059317, 3874377.1963103525,
898401.3668786548, -5541508.785762887, 2964274.437825734,
928843.2226594514, -4515751.1774108, 4376108.315712495,
928843.2226594514, -4515751.1774108, 4376108.315712495
]);

viewer.entities.add({
polygon: {
hierarchy: new Cesium.CallbackProperty(function (time, result) {
return positions;
}, false),
outline: true,
material: new Cesium.ColorMaterialProperty(Cesium.Color.WHITE.withAlpha(0.7)),
}
});
```

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied Cesium.Viewer reproduction with createWorldTerrain and the entity polygon hierarchy using CallbackProperty. Trace the polygon terrain path from viewer.entities.add and determine how duplicate final positions produce the reported error. Done means the reproduction no longer errors with those positions, with a regression test added wherever the repository’s existing polygon tests cover this path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.