Moved the point nudging for fgfs-construct from the generic polygon routines to the clipper.
This commit is contained in:
parent
b48ba44594
commit
09c7327a80
2 changed files with 5 additions and 5 deletions
|
@ -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 );
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in a new issue