One more thing, if I delete all my polys (checked with the list) and compile I still get the message :
"object is too complex and cannot be triangulated. (Polygon sides must not intersect.)"
However, the program compiles normally.
Don, do you think that I have to do this test with the lines too ?
By the time the file gets to the compiler, lines are just a series of adjacent polys and are subject to the same constraints.
Over the past couple of days, I have spent most of my time investigating why certain objects trigger this warning even though their sides clearly do not overlap. I have now discovered the reason - calculation precision.
Triangulation is a complex mathematical process. Results of one computation are used in further computations. Precision is lost each time. For example, when a side of a poly is horizontal or vertical, I'm looking for a sine or cosine of its orientation equal to 0 or 1. But, what is intended to be exactly horizontal or vertical to the eye is often not quite so after several calculation iterations. So, instead of checking for 0, you've got to check for, say -0.001<=n<=0.001. But, it's even worse than that! Allowing for 0.001 in one check may (did) lead to further problems "downstream".
Due to the need to split large objects into 100m chunks for use in FSX, there is a preponderance of horizontal and vertical edges in large objects when it comes time to triangulate.
I have added (in the next release) what appears to be suitable boundary conditions to the necessary calculations The magnitude of the boundaries was set from experimentation. The current set results in no errors in the version of your file that I have. But, I am quite certain that some other complex airport may not compile so successfully. Indeed, complexity doesn't seem to be the criteria.
Since I can't guarantee that every object will triangulate, to help users know what's wrong when an object won't triangulate, I now include in the "too complex" message the lat/lon boundaries of the offending object.
While the boundary conditions may benefit from further tweaking, I suspect in most cases, I'd simply be moving the problem to a different object. So, I'm going to quit now that I've introduced some tolerance into the algorithm - unless, of course, it is shown that the current boundary conditions are problematic.
Don