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.
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.