Home | ClipperLib |

# CleanPolygons

Del.» function CleanPolygons(const Polys: TPolygons; Distance: double = 1.415): TPolygons;

C++ » void CleanPolygons(Polygons &in_polys, Polygon &out_polys, double distance = 1.415);

C# » public static Polygons CleanPolygons(Polygons polys, double distance = 1.415);

Removes vertices:

- that join co-linear edges
- positioned within the specified distance of an adjacent vertex
- positioned within the specified distance of a semi-adjacent vertex together with their out-lying vertices

Vertices are semi-adjacent when they are separated by a single (out-lying) vertex. The distance parameter's default value approximates √2 so that adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit will precipitate the removal of one the vertices (together with the out-lying vertex if they are semi-adjacent).

## See Also

CleanPolygon, SimplifyPolygons

Copyright ©2010-2013 Angus Johnson - Clipper version 5.1.5 - Help file built on 6-May-2013