Polygon with holes bug?

Hi!

I’m trying to draw a polygon with multiple holes but I’m seeing some strange results when two of the holes touch. I have included a screen capture and a sandbox example.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var whitePolygon = viewer.entities.add({

name : ‘White polygon with holes’,

polygon : {

hierarchy : {

positions : Cesium.Cartesian3.fromDegreesArray([-95.0, 30.0,

-85.0, 30.0,

-85.0, 40.0,

-95.0, 40.0]),

holes: [

{positions : Cesium.Cartesian3.fromDegreesArray([-87.0, 32.0,

-86.0, 32.0,

-86.0, 33.0,

-87.0, 33.0])},

{positions : Cesium.Cartesian3.fromDegreesArray([-88.0, 32.5,

-87.0, 32.5,

-87.0, 33.5,

-88.0, 33.5])}

]

},

extrudedHeight: 0,

material : Cesium.Color.WHITE.withAlpha(0.5),

}

});

viewer.zoomTo(viewer.entities);

Thanks,

Eric

Hi Eric!

Thanks for providing the code sample! I posted a note in this issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/4003

We made some improvements to our triangulation algorithm recently, but I guess this is an edge case where there are still some problems.

Best,

Hannah