Polygon with perPositionHeight has missing triangles

1. A concise explanation of the problem you're experiencing.

I create a small closed model with 6 polygons using primitives
There are missing triangles, I can see inside my model
This should not be happening?

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

Code example sandcastle

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am trying to find a good way to draw in 3d

4. The Cesium version you're using, your operating system and browser.

OS = windows 10
Cesium is sandcastle latest

Just replace

PolygonGeometry

``

with:

CoplanarPolygonGeometry

``

And that should fix it!

I created a little function to render the points to make sure they were all in the right place. Just posting it here in case it’s useful to you or anyone else:

function createPoint(pos) {

var newP = Cesium.Matrix4.multiplyByPoint(mat, Cesium.Cartesian3.fromArray(pos), new Cesium.Cartesian3());

var point = viewer.entities.add({

position : newP,

point : {

color : Cesium.Color.RED,

pixelSize : 5

}

});

return point;

}

``

I’m guessing you just need to create roof2 to complete this building.

Hi Omar,

Thanks for the reply. I was not aware of the function
`CoplanarPolygonGeometry`

We also finally remembered how we solved this last time, which was to do our own triangulation before creating polygons. This also works for non-planar polygons.

Patrick