diff --git a/src/Airports/GenAirports850/airport.cxx b/src/Airports/GenAirports850/airport.cxx index 466ef46f..7a65a789 100644 --- a/src/Airports/GenAirports850/airport.cxx +++ b/src/Airports/GenAirports850/airport.cxx @@ -295,6 +295,7 @@ void Airport::BuildBtg(const string& root, const string_list& elev_src ) TGPolygon base_poly = tgPolygonDiff( divided_base, accum ); // do this when generating the polys themselves... +#if 0 for ( k = 0; k < (int)rwy_polys.size(); ++k ) { SG_LOG(SG_GENERAL, SG_DEBUG, "add nodes/remove dups section = " << k << " " << rwy_polys[k].get_material()); @@ -339,6 +340,7 @@ void Airport::BuildBtg(const string& root, const string_list& elev_src ) rwy_polys[k].set_poly( poly ); } // END do this when generating polys +#endif // add segments to polygons to remove any possible "T" // intersections diff --git a/src/Airports/GenAirports850/closedpoly.cxx b/src/Airports/GenAirports850/closedpoly.cxx index cf705f6d..35cfaa96 100644 --- a/src/Airports/GenAirports850/closedpoly.cxx +++ b/src/Airports/GenAirports850/closedpoly.cxx @@ -598,7 +598,20 @@ int ClosedPoly::BuildBtg( float alt_m, superpoly_list* rwy_polys, texparams_list string material; int j, k; - material = "pa_tiedown"; + switch( surface_type ) + { + case 1: + material = "pa_tiedown"; + break; + + case 2: + material = "pc_tiedown"; + break; + + default: + SG_LOG(SG_GENERAL, SG_DEBUG, "ClosedPoly::BuildBtg: unknown material " << surface_type ); + exit(1); + } // verify the poly has been generated if ( pre_tess.contours() ) @@ -622,17 +635,16 @@ int ClosedPoly::BuildBtg( float alt_m, superpoly_list* rwy_polys, texparams_list TGTexParams tp; TGPolygon clipped = tgPolygonDiff( pre_tess, *accum ); - SG_LOG(SG_GENERAL, SG_DEBUG, "BuildBtg: clipped poly has " << clipped.contours() << " contours"); TGPolygon split = tgPolygonSplitLongEdges( clipped, 400.0 ); - SG_LOG(SG_GENERAL, SG_DEBUG, "BuildBtg: split poly has " << split.contours() << " contours"); - sp.erase(); sp.set_poly( split ); sp.set_material( material ); + sp.set_flag("taxi"); + rwy_polys->push_back( sp ); SG_LOG(SG_GENERAL, SG_DEBUG, "clipped = " << clipped.contours()); *accum = tgPolygonUnion( pre_tess, *accum ); diff --git a/src/Airports/GenAirports850/runway.cxx b/src/Airports/GenAirports850/runway.cxx index 9b4f5328..57aae4d3 100644 --- a/src/Airports/GenAirports850/runway.cxx +++ b/src/Airports/GenAirports850/runway.cxx @@ -9,6 +9,7 @@ #include #include +#include #include #include "beznode.hxx" @@ -267,6 +268,13 @@ void Runway::gen_simple_rwy( double alt_m, const string& material, superpoly_lis SG_LOG(SG_GENERAL, SG_DEBUG, " point = " << p); } + // do this before clipping and generating the base + runway_a = remove_dups( runway_a ); + runway_a = reduce_degeneracy( runway_a ); + + runway_b = remove_dups( runway_b ); + runway_b = reduce_degeneracy( runway_b ); + TGSuperPoly sp; TGTexParams tp;