1<html> 2 3<head> 4 5 <script type="text/javascript" src="../../../../Scripts/jquery.js"> 6 </script> 7 8 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shCore.js"> 9 </script> 10 11 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushDelphi.js"> 12 </script> 13 14 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushCpp.js"> 15 </script> 16 17 <script type="text/javascript" src="../../../../Scripts/SyntaxHighlighter/scripts/shBrushCSharp.js"> 18 </script> 19 20 <link type="text/css" rel="stylesheet" href="../../../../Scripts/SyntaxHighlighter/styles/shCoreDefault.css"> 21 22 <link type="text/css" rel="stylesheet" href="../../../../Scripts/SyntaxHighlighter/styles/shThemeDefault.css"> 23 24 25 <title>CleanPolygons</title> 26 27 <link rel="stylesheet" href="../../../../Styles/default.css" type="text/css"> 28 29 30 <script type="text/javascript" src="../../../../Scripts/bootstrap.js"> 31 </script> 32 33</head> 34 35<body bgcolor="#FFFFFF"> 36 37 <!-- THIS FILE HAS BEEN AUTOMATICALLY PROCESSED FROM A SOURCE COPY --> 38 39 <!-- DO NOT EDIT MANUALLY !!! --> 40 41 <table class="Banner" cellspacing="0" cellpadding="0" border="1" bordercolorlight="#303080" bordercolordark="#7070B0"> 42 <tr> 43 <td class="Banner" nowrap=""><a href="../../../_Body.htm" class="Banner"><img src="../../../../Images/_Home.gif" align="absmiddle">Home</a> 44 </td> 45 <td class="Banner" nowrap=""><a href="../_Body.htm" class="Banner"><img src="../../../../Images/_Unit.gif" align="absmiddle">ClipperLib</a> 46 </td> 47 <td class="Banner" width="100%" align="right"><img src="../../../../Images/_Project_Logo.gif" align="absmiddle"> 48 </td> 49 </tr> 50 </table> 51 <h1>CleanPolygons</h1> 52 53 54 <p class="Decl"><span class="Comment">Del.»</span> <b>function</b> CleanPolygons(<b>const</b> Polys: TPaths; Distance: double = 1.415): TPaths;</p> 55 56 <p class="Decl2"><span class="Comment"> C++ »</span> <b>void</b> CleanPolygons(<b>const</b> Paths &in_polys, Paths &out_polys, double distance = 1.415);</p> 57 58 <p class="Decl2"><span class="Comment"> C++ »</span> <b>void</b> CleanPolygons(Paths &polys, double distance = 1.415);</p> 59 60 <p class="Decl3"><span class="Comment">C# »</span> <b>public static</b> Paths CleanPolygons(Paths polys, double distance = 1.415);</p> 61<br> 62 63 64 <p class="Body"> Removes vertices: 65 <ul> 66 67 <li>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)</li> 68 69 <li>that are within the specified distance of an adjacent vertex</li> 70 71 <li>that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices</li> 72 73 </ul> </p> 74 75 <p class="Body"> Vertices are <em>semi-adjacent</em> when they are separated by a single (out-lying) vertex.<br><br> The <em>distance</em> 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.)<br><br> C++ only: This function is overloaded. In the first definition, the <em>in_polys</em> and <em>out_polys</em> parameters can reference the same <em>Paths</em> object though in that case the calling code might be clearer if the second definition (accepting a single <em>Paths</em> parameter) is used.<br><br> <img src="../../../../Images/clean1.png" alt="" border="0"> <img src="../../../../Images/clean2.png" alt="" border="0"> </p> 76 77 78 79 80 <h2 id="Auto-SeeAlso">See Also</h2> 81 <p class="Body"><a href="CleanPolygon.htm">CleanPolygon</a>, <a href="SimplifyPolygons.htm">SimplifyPolygons</a></p> 82 83 <p class="Copyright" id="auto"> <br><br> Copyright ©2010-2014 Angus Johnson - Clipper 6.2.1 - Help file built on 1-November-2014 <br><br> </p> 84 85</body> 86 87</html>