Exemplo n.º 1
0
 /// <summary>
 /// Creates a Polygon with a reduced quantity of points tested against a deviation tolerance.
 /// </summary>
 /// <param name="tolerance">The deviation tolerance for inclusion in the final Vector3 List.</param>
 /// <returns>
 /// A new Polygon.
 /// </returns>
 public static Polygon Straighten(this Polygon polygon, double tolerance)
 {
     return(Shaper.MakePolygon(SimplifyNet.Straighten(polygon.Vertices.ToList(), tolerance)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Reduces Polyline vertices.
 /// </summary>
 /// <param name="tolerance">The tolerated deviation to include a vertex.</param>
 /// <returns>A new Polyline.</returns>
 public static Polyline Straighten(this Polyline polyline, double tolerance)
 {
     return(new Polyline(SimplifyNet.Straighten(polyline.Vertices.ToList(), tolerance)));
 }