CleanPolygon

The Clipper Library

CleanPolygon

Del.» function CleanPolygon(const Poly: TPolygon; Distance: double = 1.415): TPolygon;

C++ » void CleanPolygon(Polygon &in_poly, Polygon &out_poly, double distance = 1.415);

C#  » public static Polygon CleanPolygon(Polygon poly, double distance = 1.415);

This function removes vertices that are within the specified 'distance' from their preceeding vertices. The default distance is approx SQRT(2) so that adjacent vertices having their corresponding X and Y coordinates within 1 unit of each other will precipitate the removal of the second vertex.