Dokumentaro de Gambaso
Compilation & Installation
Components
gb
gb.crypt
gb.qt4
Documents
Indekso de Lingvo
Language Overviews
LeguMin
Lexicon
Registro

Clipper.Clean (gb.clipper)

Static Function Clean ( Polygons As Polygon[] [ , Distance As Float ] ) As Polygon[]

Removes vertices:

  • that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear).

  • that are within the specified distance of an adjacent vertex.

  • that are 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.

Polygons is an array of polygons.

The Distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)