When triangulating a polygon form _geoRES_testdatav1.0.0 from the tests, there is an infinite loop in the poly2tri call.
Test script:
from citygml2stl import polygons, citygml, exceptions
filename = 'geoRES_testdata_v1.0.0'
path = 'test/datasets/' + filename
c = citygml.CityGML(path)
for obj in c.get_objects_of_types():
for polygon in polygons.Polygons.extract_polygons(obj):
try:
polygons.Polygons.triangulate(polygon)
except exceptions.PlaneConstructionError:
pass
The problem is that the holes almost entirely cover the object (green), as seen on the gif above (scale has been adjusted and the image was rotated), even if there are no actually identical points.
When triangulating a polygon form _geoRES_testdatav1.0.0 from the tests, there is an infinite loop in the poly2tri call.
Test script:
Triangulated data (exterior and two holes):