1
0
Fork 0

stability check

- ran through the last commit, and only 10 airports crashed / locked up.
- EICL, SSPK, and LFBT fix was to simplify the base polygon during cleaning
  reduce_degeneracy() could also be used to fix the issue
  2 polygons clipped against each other shared a vertex.  This causes the
  resulting contour to have a duplicate point with different line segments.
  Luckily, clipper's polygon simplification cleans this up by adding a
  hole contour.  In the above airports, triangulation suceeded, but I'm
  not 100% convinced it will work for all cases.  reduce_degeneracy() will,
  at the expense of modified geometry (very noticible)
- EGLW and SWCH (I think - can't read my own writing) were fixed by expanding
  the user defined boundary by 2 meters for the base, and 5 meters for the
  clearing.  These 2 airports had the user defined boundary touching the exact
  airport layout.  When the base was diffed with the accumulation buffer, the
  resulting polygon was NIL.
  Starting a whole new stability test from the beginning to check for
  regressions.  Down to 5 airports with isses left.
This commit is contained in:
Peter Sadrozinski 2012-02-06 20:58:22 -05:00 committed by Christian Schmitt
parent ff352fad28
commit 2dac4a87e5
2 changed files with 6 additions and 10 deletions

View file

@ -723,6 +723,7 @@ void Airport::BuildBtg(const string& root, const string_list& elev_src )
base_poly = remove_cycles( base_poly );
base_poly = remove_dups( base_poly );
base_poly = remove_bad_contours( base_poly );
base_poly = tgPolygonSimplify( base_poly );
base_poly = remove_tiny_contours( base_poly );
base_poly = remove_spikes( base_poly );
base_poly = remove_dups( base_poly );

View file

@ -596,14 +596,7 @@ int ClosedPoly::BuildBtg( float alt_m, superpoly_list* rwy_polys, texparams_list
if ( apt_base )
{
// ExpandContour( hull, base, 20.0 );
base = tgPolygonExpand( pre_tess, 20.0);
// dump pre_tess and base
//SG_LOG(SG_GENERAL, SG_INFO, "BuildBtg: original poly " << pre_tess );
//SG_LOG(SG_GENERAL, SG_INFO, "BuildBtg: expanded poly " << base );
// ExpandContour( hull, safe_base, 50.0 );
safe_base = tgPolygonExpand( pre_tess, 50.0);
// add this to the airport clearing
@ -619,6 +612,8 @@ int ClosedPoly::BuildBtg( float alt_m, superpoly_list* rwy_polys, texparams_list
return 1;
}
// Just used for user defined border - add a little bit, as some modelers made the border exactly on the edges
// - resulting in no base, which we can't handle
int ClosedPoly::BuildBtg( float alt_m, TGPolygon* apt_base, TGPolygon* apt_clearing )
{
TGPolygon base, safe_base;
@ -628,14 +623,14 @@ int ClosedPoly::BuildBtg( float alt_m, TGPolygon* apt_base, TGPolygon* apt_clear
{
SG_LOG(SG_GENERAL, SG_DEBUG, "BuildBtg: original poly has " << pre_tess.contours() << " contours");
hull = pre_tess.get_contour(0);
ExpandContour( hull, safe_base, 20.0 );
base = tgPolygonExpand( pre_tess, 2.0);
safe_base = tgPolygonExpand( pre_tess, 5.0);
// add this to the airport clearing
*apt_clearing = tgPolygonUnion( safe_base, *apt_clearing);
// and add the clearing to the base
*apt_base = tgPolygonUnion( pre_tess, *apt_base );
*apt_base = tgPolygonUnion( base, *apt_base );
}
return 1;