diff --git a/TileBakeLibrary/CityJSONParsing/CityJSON.cs b/TileBakeLibrary/CityJSONParsing/CityJSON.cs index d1cef09..c1fb4fe 100644 --- a/TileBakeLibrary/CityJSONParsing/CityJSON.cs +++ b/TileBakeLibrary/CityJSONParsing/CityJSON.cs @@ -402,7 +402,7 @@ private Surface ReadSurfaceVectors(JSONNode surfacenode, CityObject sourceCityOb surf.innerRings.Add(verts); } else{ - sourceCityObject.warnings += "- Holes in surface detected, but not supported. Ignoring holes.\n"; + sourceCityObject.holeWarnings += "- Found a hole with less than 3 vertices, skipping this hole.\n"; } } @@ -432,7 +432,8 @@ public class CityObject public string cityObjectType; public string keyName = ""; - public string warnings = ""; + public string holeWarnings = ""; + public string triangulationWarnings = ""; public CityObject() { diff --git a/TileBakeLibrary/CityJSONToTileConverter.cs b/TileBakeLibrary/CityJSONToTileConverter.cs index 529f81f..82286f2 100644 --- a/TileBakeLibrary/CityJSONToTileConverter.cs +++ b/TileBakeLibrary/CityJSONToTileConverter.cs @@ -478,10 +478,12 @@ private List CityJSONParseProcess(CityJSON cityJson, ConcurrentBag vertexNormalCombinations = new Dictionary(); for (int i = 0; i < triangleIndices.Count; i++) @@ -236,19 +235,18 @@ public List ClipSubobject(Vector2 size) } else { - for (int y = localYmin; y < localYmax; y += (int)size.Y) - { - SubObject newSubobject = ClipMesh(columnMesh, x, y,size.Y); - if (newSubobject != null) - { + for (int y = localYmin; y < localYmax; y += (int)size.Y) + { + SubObject newSubobject = ClipMesh(columnMesh, x, y,size.Y); + if (newSubobject != null) + { - subObjects.Add(newSubobject); - } - } + subObjects.Add(newSubobject); + } + } } } - return subObjects; } diff --git a/TileBakeLibrary/Triangulation/Poly2Mesh.cs b/TileBakeLibrary/Triangulation/Poly2Mesh.cs index 42d5a38..a2c5e2b 100644 --- a/TileBakeLibrary/Triangulation/Poly2Mesh.cs +++ b/TileBakeLibrary/Triangulation/Poly2Mesh.cs @@ -266,7 +266,7 @@ public static void CreateMeshData(Polygon polygon, out Vector3[] vertices, out V { Console.WriteLine("Failed to triangulate polygon: " + e.Message); Console.WriteLine("With name: " + cityObject.keyName); - cityObject.warnings += "- Failed to triangulate polygon: " + e.Message + "\n"; + cityObject.triangulationWarnings += "- Failed to triangulate polygon: " + e.Message + "\n"; return; } // Now, to get back to our original positions, use our code-to-position map. We do