---
title: "Path.Simplify Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_Simplify_1_7a94462e.htm
archived: false
applies_to:
  - product: "Graphics Mill"
    versions: ["12.1", "6.x-12.x (may differ)"]
    entity_id: "https://www.graphicsmill.com/#software-application"
---

# Path.Simplify Method 

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Removes the points of the path that lie close to the line through their neighbors.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void Simplify(float tolerance
)
```
 
### Parameters
 
 - tolerance
     - Type: System.Single
The largest allowed distance from a removed point to the line, in path units. Must be greater than 0.
 
## Remarks
 This method uses the Douglas-Peucker algorithm. The ends of open subpaths stay. Curves are converted to polylines first.
 
## Examples
  
```csharp
// A noisy line, for example, a line drawn by hand.
var path = new Path();
for (int i = 0; i <= 40; i++)
{
    float x = 15 + i * 3;
    float y = 75 - 45 * (float)System.Math.Sin(i * System.Math.PI / 20) + ((i * 7) % 5 - 2);

    if (i == 0)
        path.MoveTo(x, y);
    else
        path.LineTo(x, y);
}

var original = new Path(path);

// Remove the points that are closer than 3 units to the line through their neighbors.
path.Simplify(3f);
```
 
The original path and the simplified path.
 ![The original path and the simplified path.](https://www.graphicsmill.com/docs/gm/PathSimplify.png)
 
## Exceptions
  
|  Exception |  Condition |
| --- | --- |
 |  System.ArgumentOutOfRangeException |  The tolerance is not greater than 0. |
   
## See Also

### Reference

- [Path Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Path.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Working with Paths](https://www.graphicsmill.com/docs/gm/working-with-path.htm.md)
