diff --git a/src/BuildTiles/Clipper/clipper.cxx b/src/BuildTiles/Clipper/clipper.cxx index ce27d792..5c6ba297 100644 --- a/src/BuildTiles/Clipper/clipper.cxx +++ b/src/BuildTiles/Clipper/clipper.cxx @@ -127,7 +127,7 @@ bool TGClipper::load_polys(const string& path) { } else { startz = -9999.0; } - p = Point3D(startx, starty, startz); + p = Point3D(startx+0.2*SG_EPSILON, starty+0.2*SG_EPSILON, startz); poly.add_node( i, p ); if ( poly3d ) { fixed_elevations.unique_add( p ); @@ -141,7 +141,7 @@ bool TGClipper::load_polys(const string& path) { } else { z = -9999.0; } - p = Point3D( x, y, z ); + p = Point3D( x+0.2*SG_EPSILON, y+0.2*SG_EPSILON, z ); poly.add_node( i, p ); if ( poly3d ) { fixed_elevations.unique_add( p ); @@ -161,7 +161,7 @@ bool TGClipper::load_polys(const string& path) { && (fabs(startz - lastz) < SG_EPSILON) ) { // last point same as first, discard } else { - p = Point3D( lastx, lasty, lastz ); + p = Point3D( lastx+0.2*SG_EPSILON, lasty+0.2*SG_EPSILON, lastz ); poly.add_node( i, p ); if ( poly3d ) { fixed_elevations.unique_add( p ); diff --git a/src/Lib/Polygon/polygon.cxx b/src/Lib/Polygon/polygon.cxx index 8d132d05..2190dd05 100644 --- a/src/Lib/Polygon/polygon.cxx +++ b/src/Lib/Polygon/polygon.cxx @@ -325,8 +325,8 @@ void make_gpc_poly( const TGPolygon& in, gpc_polygon *out ) { for ( int j = 0; j < in.contour_size( i ); ++j ) { p = in.get_pt( i, j ); - v_list.vertex[j].x = p.x()+2*SG_EPSILON; - v_list.vertex[j].y = p.y()+2*SG_EPSILON; + v_list.vertex[j].x = p.x(); + v_list.vertex[j].y = p.y(); } v_list.num_vertices = in.contour_size( i ); gpc_add_contour( out, &v_list, in.get_hole_flag( i ) );