title: Eyeshot PolyRegion2D.Union with tolerance
body: <p>I would like to join two polygons which are nearly tangent. The problem is that the library that I use does not allow to specify a tolerance.</p>
  
  <p>The method I tried to use is <code>PolyRegion2D.Union</code>. The result I would like to obtain should be a single <code>PolyRegion2D</code>, no union is performed instead.</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>Polygon2D pa = new Polygon2D(new Point2D[] {
      new Point2D(1.15938971595503,-0.199967078272286),
      new Point2D(1.52634922341708,-0.420128484528485),
      new Point2D(1.70641430562392,-0.120000722926738),
      new Point2D(1.17299051700752,0.200032892324767),
      new Point2D(0.561190378505281,0.200032892324767),
      new Point2D(0.561190378505281,-0.199967078272286),
      new Point2D(1.15938971595503,-0.199967078272286)
  });
  PolyRegion2D a = new PolyRegion2D(new Polygon2D[] { pa });
  
  Polygon2D pb = new Polygon2D(new Point2D[] {
      new Point2D(2.15660570919657,-0.39009846249557),
      new Point2D(1.70641430562392,-0.120000887257862),
      new Point2D(1.52634925853194,-0.420128484528485),
      new Point2D(1.97654066210459,-0.690226059766193),
      new Point2D(2.15660570919657,-0.39009846249557)
  });
  PolyRegion2D b = new PolyRegion2D(new Polygon2D[] { pb });
  
  PolyRegion2D[] ab = PolyRegion2D.Union(a, b);
  
  Assert.AreEqual(1, ab.Length);
  </code></pre>
  
  <p>I tried also to convert the <code>PolyRegion2D</code>s to <code>Region</code>, specifing various deviations on the <code>Regen</code> method, but I obtain the same result.</p>
  
  <p>The only workaround that I've found is to <code>Offset</code> the regions by some amount before the union, but it seems overwhelming.</p>